|
@@ -2,15 +2,15 @@ package cn.cslg.pas.service;
|
|
|
|
|
|
import cn.cslg.pas.common.core.base.Constants;
|
|
|
import cn.cslg.pas.common.core.exception.CustomException;
|
|
|
-import cn.cslg.pas.common.model.DataSource;
|
|
|
import cn.cslg.pas.common.model.PersonnelVO;
|
|
|
import cn.cslg.pas.common.model.dto.UploadFileDTO;
|
|
|
-import cn.cslg.pas.common.model.params.*;
|
|
|
-import cn.cslg.pas.common.model.vo.*;
|
|
|
+import cn.cslg.pas.common.model.vo.ProjectExportVO;
|
|
|
+import cn.cslg.pas.common.model.vo.ProjectImportVO;
|
|
|
+import cn.cslg.pas.common.model.vo.ProjectVO;
|
|
|
+import cn.cslg.pas.common.model.vo.TaskParams;
|
|
|
import cn.cslg.pas.common.utils.*;
|
|
|
import cn.cslg.pas.common.utils.SecurityUtils.LoginUtils;
|
|
|
import cn.cslg.pas.common.utils.SecurityUtils.SecurityUtils;
|
|
|
-import cn.cslg.pas.common.utils.auth.checkAuth;
|
|
|
import cn.cslg.pas.domain.*;
|
|
|
import cn.cslg.pas.mapper.ProjectMapper;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
@@ -34,14 +34,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
-import okhttp3.FormBody;
|
|
|
-import okhttp3.OkHttpClient;
|
|
|
-import okhttp3.Request;
|
|
|
-import okhttp3.RequestBody;
|
|
|
-import org.apache.poi.ss.usermodel.PictureData;
|
|
|
-import org.aspectj.lang.reflect.MethodSignature;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -52,7 +45,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.*;
|
|
|
-import java.lang.reflect.Method;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -85,14 +77,12 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
private final PatentInventorLinkService patentInventorLinkService;
|
|
|
private final PatentSimpleFamilyService patentSimpleFamilyService;
|
|
|
private final PatentSimpleFamilyLinkService patentSimpleFamilyLinkService;
|
|
|
- private final PatentClassNumberService patentClassNumberService;
|
|
|
private final PatentClassNumberLinkService patentClassNumberLinkService;
|
|
|
private final ProjectPatentLinkService projectPatentLinkService;
|
|
|
private final TaskService taskService;
|
|
|
private final PatentImageService patentImageService;
|
|
|
private final ProjectFieldPatentLinkService projectFieldPatentLinkService;
|
|
|
private final ProjectFolderService projectFolderService;
|
|
|
- private final ProjectFolderPatentLinkService projectFolderPatentLinkService;
|
|
|
private final ProjectFieldService projectFieldService;
|
|
|
private final ProjectFieldOptionService projectFieldOptionService;
|
|
|
private final ProjectFieldTreeService projectFieldTreeService;
|
|
@@ -111,8 +101,6 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
private final UserService userService;
|
|
|
private final ApiUtils apiUtils;
|
|
|
private final LoginUtils loginUtils;
|
|
|
- @Value("${authorUrl}")
|
|
|
- private String url;
|
|
|
|
|
|
public Project getProjectByName(String name) {
|
|
|
LambdaQueryWrapper<Project> queryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -262,7 +250,6 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
projectList = projectList.stream().filter(item -> item.getScenarioName().contains(scenario)).collect(Collectors.toList());
|
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList(Constants.INVESTIGATION_TYPE));
|
|
|
for (SystemDict systemDict : systemDictList) {
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
map.put(systemDict.getLabel(), projectList.stream().filter(item -> item.getTypeList().contains(Integer.parseInt(systemDict.getValue()))).count());
|
|
|
}
|
|
|
return map;
|
|
@@ -331,7 +318,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
}
|
|
|
Project temp = this.getById(projectId);
|
|
|
Project data = JsonUtils.jsonToPojo(json, Project.class);
|
|
|
- Client client = clientService.getClientByName(data.getClientName());
|
|
|
+ Client client = clientService.getClientByName(Objects.requireNonNull(data).getClientName());
|
|
|
if (client == null) {
|
|
|
client = new Client();
|
|
|
client.setName(data.getClientName());
|
|
@@ -368,7 +355,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
return Response.error("专题库名称已存在");
|
|
|
}
|
|
|
if (project.getClientId() == -1) {
|
|
|
- project.setClientId(this.getNewClientId(project.getClientName(),user.getTenantId()));
|
|
|
+ project.setClientId(this.getNewClientId(project.getClientName(), user.getTenantId()));
|
|
|
}
|
|
|
project.setScenario(StringUtils.join(project.getScenarioList(), ","));
|
|
|
project.setType(StringUtils.join(project.getTypeList(), ","));
|
|
@@ -383,12 +370,12 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
@Transactional
|
|
|
public String edit(Project project) {
|
|
|
Project temp = this.getProjectByName(project.getName());
|
|
|
- Project project1 =this.getProjectById(project.getId());
|
|
|
+ Project project1 = this.getProjectById(project.getId());
|
|
|
if (temp != null && !temp.getId().equals(project.getId())) {
|
|
|
return Response.error("专题库名称已存在");
|
|
|
}
|
|
|
if (project.getClientId() == -1) {
|
|
|
- project.setClientId(this.getNewClientId(project.getClientName(),project1.getTenantId()));
|
|
|
+ project.setClientId(this.getNewClientId(project.getClientName(), project1.getTenantId()));
|
|
|
}
|
|
|
project.setScenario(StringUtils.join(project.getScenarioList(), ","));
|
|
|
project.setType(StringUtils.join(project.getTypeList(), ","));
|
|
@@ -409,7 +396,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
return Response.success();
|
|
|
}
|
|
|
|
|
|
- private Integer getNewClientId(String name,Integer tenantId) {
|
|
|
+ private Integer getNewClientId(String name, Integer tenantId) {
|
|
|
|
|
|
Client client = clientService.getOne(Wrappers.<Client>lambdaQuery().eq(Client::getName, name).last("limit 1"));
|
|
|
if (client == null) {
|
|
@@ -439,16 +426,16 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String importExcel(MultipartFile file) {
|
|
|
- try { PersonnelVO user = cacheUtils.getLoginUserPersonnel(loginUtils.getId());
|
|
|
+ try {
|
|
|
+ PersonnelVO user = cacheUtils.getLoginUserPersonnel(loginUtils.getId());
|
|
|
ExcelReader reader = ExcelUtil.getReader(file.getInputStream());
|
|
|
List<Map<String, Object>> readAll = reader.readAll();
|
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.INVESTIGATION_TYPE, Constants.ENTERPRISE_APPLICATION_SCENARIO));
|
|
|
- for (int i = 0; i < readAll.size(); i++) {
|
|
|
- Map<String, Object> row = readAll.get(i);
|
|
|
+ for (Map<String, Object> row : readAll) {
|
|
|
Project project = new Project();
|
|
|
project.setSort(1);
|
|
|
project.setName(row.get("专题库名称").toString());
|
|
|
- project.setClientId(this.getNewClientId(row.get("委托方").toString(),user.getTenantId()));
|
|
|
+ project.setClientId(this.getNewClientId(row.get("委托方").toString(), user.getTenantId()));
|
|
|
project.setRemark(row.get("备注").toString());
|
|
|
project.setCreateBy(loginUtils.getId());
|
|
|
project.setCreateTime(DateUtils.getDateTime());
|
|
@@ -497,7 +484,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
- public String share(Integer id, List<Integer> userIds ,List<ProjectUser.User> users) {
|
|
|
+ public String share(Integer id, List<Integer> userIds, List<ProjectUser.User> users) {
|
|
|
ProjectUser user = new ProjectUser();
|
|
|
user.setType(3);
|
|
|
user.setRemark("用户分享");
|
|
@@ -527,421 +514,6 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
return taskParams;
|
|
|
}
|
|
|
|
|
|
- @Async("singleThreadAsyncTaskExecutor")
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
- public void importPatent(TaskParams params, ProjectImportPatentVO projectImportPatentVO) {
|
|
|
- Integer total = params.getRowList().size();
|
|
|
- try {
|
|
|
- if (projectImportPatentVO != null) {
|
|
|
- List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.PATENT_TYPE, Constants.PATENT_SIMPLE_STATUS));
|
|
|
- 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);
|
|
|
- Object patentNo = row.get("公开(公告)号");
|
|
|
- if (StringUtils.isNotNull(patentNo)) {
|
|
|
- PatentCustomFieldParams patentCustomFieldParams = new PatentCustomFieldParams();
|
|
|
- //用专利号查找专利的相关信息 并装配到 Patent 中
|
|
|
- Patent patent = patentService.getByPatentNo(patentNo.toString());
|
|
|
- //法律状态/事件|INPADOC法律状态|法律状态更新时间|简单法律状态
|
|
|
- PatentAffairParams patentAffairParams = new PatentAffairParams();
|
|
|
- //当前申请(专利权)人
|
|
|
- List<String> patentApplicantCurrentName = new ArrayList<>();
|
|
|
- //原始申请(专利权)人
|
|
|
- List<String> patentApplicantOriginalName = new ArrayList<>();
|
|
|
- //[标]当前申请(专利权)人
|
|
|
- List<String> patentApplicantStandardCurrentName = new ArrayList<>();
|
|
|
- //[标]原始申请(专利权)人
|
|
|
- List<String> patentApplicantStandardOriginalName = new ArrayList<>();
|
|
|
- //发明人|第一发明人
|
|
|
- PatentInventorParams patentInventorParams = new PatentInventorParams();
|
|
|
- //简单同族|PatSnap同族|INPADOC同族
|
|
|
- PatentSimpleFamilyParams patentSimpleFamilyParams = new PatentSimpleFamilyParams();
|
|
|
- //IPC分类号|UPC分类号|LOC分类号|CPC分类号|IPC主分类号|UPC主分类号
|
|
|
- PatentClassNumberParams patentClassNumberParams = new PatentClassNumberParams();
|
|
|
- //许可人|被许可人|许可类型
|
|
|
- PatentLicensorParams patentLicensorParams = new PatentLicensorParams();
|
|
|
- //质押人|质权人
|
|
|
- PatentPledgeParams patentPledgeParams = new PatentPledgeParams();
|
|
|
- //代理人
|
|
|
- PatentAgentParams patentAgentParams = new PatentAgentParams();
|
|
|
- //当前申请(专利权)人地址|当前申请(专利权)人国家|当前第一申请(专利权)人地址|原始申请(专利权)人地址|原始申请(专利权)人国家
|
|
|
- PatentApplicantAddressParams patentApplicantAddressParams = new PatentApplicantAddressParams();
|
|
|
- //发明人地址|第一发明人地址
|
|
|
- PatentInventorAddressParams patentInventorAddressParams = new PatentInventorAddressParams();
|
|
|
- //说明书|说明书(译)
|
|
|
- PatentInstructionTextParams patentInstructionTextParams = new PatentInstructionTextParams();
|
|
|
- //权利要求|独立权利要求|权利要求(译)
|
|
|
- PatentRightParams patentRightParams = new PatentRightParams();
|
|
|
- //标签
|
|
|
- PatentLabelParams patentLabelParams = new PatentLabelParams();
|
|
|
-
|
|
|
- if (patent == null) {
|
|
|
- patent = new Patent();
|
|
|
- patent.setPatentNo(patentNo.toString());
|
|
|
- patent.setPublicNo(patentNo.toString());
|
|
|
- patent.insert();
|
|
|
- }
|
|
|
- patentAffairParams.setPatentId(patent.getId());
|
|
|
- patentInventorParams.setPatentId(patent.getId());
|
|
|
- patentSimpleFamilyParams.setPatentId(patent.getId());
|
|
|
- patentSimpleFamilyParams.setPatentNo(patent.getPatentNo());
|
|
|
- patentClassNumberParams.setPatentId(patent.getId());
|
|
|
- patentCustomFieldParams.setPatentId(patent.getId());
|
|
|
- patentCustomFieldParams.setProjectId(projectImportPatentVO.getProjectId());
|
|
|
- patentCustomFieldParams.setUserId(Integer.parseInt(params.getUserId()));
|
|
|
- patentLicensorParams.setPatentId(patent.getId());
|
|
|
- patentPledgeParams.setPatentId(patent.getId());
|
|
|
- patentAgentParams.setPatentId(patent.getId());
|
|
|
- patentApplicantAddressParams.setPatentId(patent.getId());
|
|
|
- patentInventorAddressParams.setPatentId(patent.getId());
|
|
|
- patentInstructionTextParams.setPatentId(patent.getId());
|
|
|
- patentRightParams.setPatentId(patent.getId());
|
|
|
- patentRightParams.setPatentNo(patent.getPatentNo());
|
|
|
- patentLabelParams.setPatentId(patent.getId());
|
|
|
- patentLabelParams.setProjectId(projectImportPatentVO.getProjectId());
|
|
|
- for (Object object : row.keySet()) {
|
|
|
- String key = object.toString();
|
|
|
- if (key.equals("摘要附图")) {
|
|
|
- PictureData pictureData = pictureDataMap.get(String.valueOf(i + 1));
|
|
|
- if (pictureData != null) {
|
|
|
- //1.先把Excel里的图片存到文件夹里 路径大致是 ../target/file/时间/文件.png 2.生成完文件并存完后 将文件的路径和名称存到表里 OS_PATENT_IMAGE 然后最终得到摘要图片的存储路径
|
|
|
- String abstractPath = patentImageService.updatePatentImage(patent.getId(), pictureData);
|
|
|
- //将路径进行装配
|
|
|
- patent.setAbstractPath(abstractPath);
|
|
|
- }
|
|
|
- }
|
|
|
- Object value = row.get(key);
|
|
|
- if (StringUtils.isNotNull(value) && !value.equals("") && !value.equals("-") && !value.equals("\\")) {
|
|
|
- switch (key) {
|
|
|
- case "标题":
|
|
|
- List<String> titles = StringUtils.changeStringToString(value.toString(), " \\| ");
|
|
|
- if (titles.size() == 2) {
|
|
|
- patent.setName(titles.get(0));
|
|
|
- patent.setNameOut(titles.get(1));
|
|
|
- } else {
|
|
|
- patent.setName(value.toString());
|
|
|
- }
|
|
|
- break;
|
|
|
- case "摘要":
|
|
|
- List<String> abstracts = StringUtils.changeStringToString(value.toString(), " \\| ");
|
|
|
- if (abstracts.size() == 2) {
|
|
|
- patent.setAbstractStr(abstracts.get(0));
|
|
|
- patent.setAbstractOut(abstracts.get(1));
|
|
|
- } else {
|
|
|
- patent.setAbstractStr(value.toString());
|
|
|
- }
|
|
|
- break;
|
|
|
- case "公开(公告)日":
|
|
|
- patent.setPublicDate(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "当前申请(专利权)人":
|
|
|
- patentApplicantCurrentName.addAll(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "当前申请(专利权)人地址":
|
|
|
- //patentApplicantAddressParams.setCurrentAddress(value.toString());
|
|
|
- break;
|
|
|
- case "当前申请(专利权)人国家":
|
|
|
- //patentApplicantAddressParams.setCurrentCountry(value.toString());
|
|
|
- break;
|
|
|
- case "[标]当前申请(专利权)人":
|
|
|
- patentApplicantStandardCurrentName.addAll(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "法律状态/事件":
|
|
|
- //patentAffairParams.setStatusList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "INPADOC法律状态":
|
|
|
- patentAffairParams.setContent(value.toString());
|
|
|
- break;
|
|
|
- case "法律状态更新时间":
|
|
|
- patentAffairParams.setDateTime(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "简单法律状态":
|
|
|
- Integer simpleStatus = Integer.parseInt(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getLabel().equals(value.toString())).findFirst().orElse(new SystemDict()).getValue());
|
|
|
- patent.setSimpleStatus(simpleStatus);
|
|
|
- patentAffairParams.setSimpleStatus(simpleStatus);
|
|
|
- break;
|
|
|
- case "申请号":
|
|
|
- patent.setApplicationNo(value.toString());
|
|
|
- break;
|
|
|
- case "文献代码":
|
|
|
- patent.setCode(value.toString());
|
|
|
- break;
|
|
|
- case "受理局":
|
|
|
- patent.setBureau(value.toString());
|
|
|
- break;
|
|
|
- case "申请日":
|
|
|
- patent.setApplicationDate(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "摘要(译)":
|
|
|
- patent.setAbstractOut(value.toString());
|
|
|
- break;
|
|
|
- case "标题(译)":
|
|
|
- patent.setNameOut(value.toString());
|
|
|
- break;
|
|
|
- case "专利类型":
|
|
|
- Integer type = Integer.parseInt(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_TYPE) && systemDict.getLabel().equals(value.toString())).findFirst().orElse(new SystemDict()).getValue());
|
|
|
- patent.setType(type);
|
|
|
- break;
|
|
|
- case "说明书":
|
|
|
- patentInstructionTextParams.setManual(value.toString());
|
|
|
- break;
|
|
|
- case "说明书(译)":
|
|
|
- patentInstructionTextParams.setManualOut(value.toString());
|
|
|
- break;
|
|
|
- case "文献页数":
|
|
|
- patent.setDocPage(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "首次公开日":
|
|
|
- patent.setFirstPublicDate(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "当前第一申请(专利权)人":
|
|
|
- break;
|
|
|
- case "当前申请(专利权)人数量":
|
|
|
- patent.setApplicantNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "当前第一申请(专利权)人地址":
|
|
|
- patentApplicantAddressParams.setFirstCurrentAddress(value.toString());
|
|
|
- break;
|
|
|
- case "发明人地址":
|
|
|
- patentInventorAddressParams.setAddress(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "第一发明人地址":
|
|
|
- patentInventorAddressParams.setFirstAddress(value.toString());
|
|
|
- break;
|
|
|
- case "原始申请(专利权)人":
|
|
|
- patentApplicantOriginalName.addAll(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "原始申请(专利权)人地址":
|
|
|
- //patentApplicantAddressParams.setOriginalAddress(value.toString());
|
|
|
- break;
|
|
|
- case "原始申请(专利权)人国家":
|
|
|
- //patentApplicantAddressParams.setOriginalCountry(value.toString());
|
|
|
- break;
|
|
|
- case "[标]原始申请(专利权)人":
|
|
|
- patentApplicantStandardOriginalName.addAll(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "发明人":
|
|
|
- patentInventorParams.setNameList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "第一发明人":
|
|
|
- patentInventorParams.setFirstName(value.toString());
|
|
|
- break;
|
|
|
- case "发明人数量":
|
|
|
- patent.setInventorNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "权利要求":
|
|
|
- patentRightParams.setContent(value.toString());
|
|
|
- break;
|
|
|
- case "独立权利要求":
|
|
|
- patentRightParams.setSelfContent(value.toString());
|
|
|
- break;
|
|
|
- case "权利要求(译)":
|
|
|
- patentRightParams.setContentOut(value.toString());
|
|
|
- break;
|
|
|
- case "权利要求数量":
|
|
|
-// if ("该数据不支持导出".equals(value.toString())) {
|
|
|
-// patent.setSelfRightContentNum(0);
|
|
|
-// } else {
|
|
|
-//
|
|
|
-// }
|
|
|
- patent.setSelfRightContentNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "IPC分类号":
|
|
|
- patentClassNumberParams.setIpcList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "UPC分类号":
|
|
|
- patentClassNumberParams.setUpcList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "LOC分类号":
|
|
|
- patentClassNumberParams.setLocList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "CPC分类号":
|
|
|
- patentClassNumberParams.setCpcList(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "IPC主分类号":
|
|
|
- patentClassNumberParams.setMainIpc(value.toString());
|
|
|
- break;
|
|
|
- case "UPC主分类号":
|
|
|
- patentClassNumberParams.setMainUpc(value.toString());
|
|
|
- break;
|
|
|
- case "简单同族":
|
|
|
- patentSimpleFamilyParams.setSimpleFamily(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "简单同族成员数量":
|
|
|
- patent.setSimpleFamilyNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "PatSnap同族":
|
|
|
- patentSimpleFamilyParams.setPatSnapFamily(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "PatSnap同族成员数量":
|
|
|
- patent.setPatSnapFamilyNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "INPADOC同族":
|
|
|
- patentSimpleFamilyParams.setInpadocFamily(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "INPADOC同族成员数量":
|
|
|
- patent.setInpadocFamilyNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "优先权号":
|
|
|
- patent.setPriorityNo(value.toString());
|
|
|
- break;
|
|
|
- case "授权日":
|
|
|
- patent.setPublicAccreditDate(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "优先权国家":
|
|
|
- patent.setPriorityCountry(value.toString());
|
|
|
- break;
|
|
|
- case "优先权日":
|
|
|
- patent.setPriorityDate(DateUtils.getDateTime(value.toString()));
|
|
|
- break;
|
|
|
- case "非专利引用文献":
|
|
|
- patent.setNotPatentQuote(value.toString());
|
|
|
- break;
|
|
|
- case "非专利引用文献数量":
|
|
|
- patent.setNotPatentQuoteNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "被引用专利":
|
|
|
- patent.setQuoted(value.toString());
|
|
|
- break;
|
|
|
- case "被引用专利数量":
|
|
|
- patent.setQuotedNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "引用专利":
|
|
|
- patent.setQuote(value.toString());
|
|
|
- break;
|
|
|
- case "引用专利数量":
|
|
|
- patent.setQuoteNum(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "3年内被引用次数":
|
|
|
- patent.setQuotedNum3(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "5年内被引用次数":
|
|
|
- patent.setQuotedNum5(Integer.parseInt(value.toString()));
|
|
|
- break;
|
|
|
- case "许可人":
|
|
|
- patentLicensorParams.setLicensor(PatentUtils.getPatentLicensor(value.toString()));
|
|
|
- break;
|
|
|
- case "被许可人":
|
|
|
- patentLicensorParams.setLicensee(PatentUtils.getPatentLicensor(value.toString()));
|
|
|
- break;
|
|
|
- case "许可类型":
|
|
|
- patentLicensorParams.setType(PatentUtils.getPatentLicensor(value.toString()));
|
|
|
- break;
|
|
|
- case "质押人":
|
|
|
- patentPledgeParams.setPledgor(PatentUtils.getPatentLicensor(value.toString()));
|
|
|
- break;
|
|
|
- case "质权人":
|
|
|
- patentPledgeParams.setPledgee(PatentUtils.getPatentLicensor(value.toString()));
|
|
|
- break;
|
|
|
- case "EP指定国状态":
|
|
|
- patent.setEpStatus(value.toString());
|
|
|
- break;
|
|
|
- case "WO国家阶段":
|
|
|
- patent.setWo(value.toString());
|
|
|
- break;
|
|
|
- case "代理机构":
|
|
|
- patent.setAgencyId(patentAgencyService.getAgencyStringIdByName(value.toString()));
|
|
|
- break;
|
|
|
- case "代理人":
|
|
|
- patentAgentParams.setAgent(PatentUtils.formatValue(value.toString()));
|
|
|
- break;
|
|
|
- case "审查员":
|
|
|
- patent.setExaminer(value.toString());
|
|
|
- break;
|
|
|
- case "助理审查员":
|
|
|
- patent.setAidExaminer(value.toString());
|
|
|
- break;
|
|
|
- case "标签":
|
|
|
- patentLabelParams.setLabel(PatentUtils.formatValue2(value.toString()));
|
|
|
- break;
|
|
|
- default:
|
|
|
- List<String> fields = StringUtils.changeStringToString(key, ":");
|
|
|
- if (fields.size() == 2) {
|
|
|
- patentCustomFieldParams.put(key, PatentUtils.formatValue2(value.toString()));
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
- } else {
|
|
|
- List<String> fields = StringUtils.changeStringToString(key, ":");
|
|
|
- if (fields.size() == 2) {
|
|
|
- patentCustomFieldParams.put(key, null);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- patent.updateById();
|
|
|
- //专利权利要求表
|
|
|
- //patentRightService.updatePatentRight(patentRightParams);
|
|
|
- //专利说明书(文本)
|
|
|
- //patentInstructionTextService.updatePatentInstructionText(patentInstructionTextParams);
|
|
|
- //代理人 (代理人关联专利)
|
|
|
- //patentAgentService.updatePatentAgent(patentAgentParams);
|
|
|
- //专利信息质押质权人
|
|
|
- //patentPledgeService.updatePatentPledge(patentPledgeParams);
|
|
|
- //专利信息许可人
|
|
|
- //patentLicensorService.updatePatentLicensor(patentLicensorParams);
|
|
|
- //专利信息事务信息
|
|
|
- //patentAffairService.updatePatientAffair(patentAffairParams);
|
|
|
- //权利人
|
|
|
- patentApplicantLinkService.updatePatentApplicantLink(patentApplicantCurrentName, patentApplicantStandardCurrentName, 1, patent.getId());
|
|
|
- //申请人
|
|
|
- patentApplicantLinkService.updatePatentApplicantLink(patentApplicantOriginalName, patentApplicantStandardOriginalName, 2, patent.getId());
|
|
|
- //申请人地址
|
|
|
- patentApplicantService.updatePatentApplicantAddress(patentApplicantAddressParams);
|
|
|
- //发明人
|
|
|
- patentInventorService.updatePatentInventor(patentInventorParams);
|
|
|
- //发明人地址
|
|
|
- patentInventorService.updatePatentInventorAddress(patentInventorAddressParams);
|
|
|
- //专利信息简单同族关联
|
|
|
- //patentSimpleFamilyService.updatePatentSimpleFamily(patentSimpleFamilyParams);
|
|
|
- //专利分类号关联
|
|
|
- //patentClassNumberLinkService.updatePatentClassNumberLink(patentClassNumberParams);
|
|
|
- //专题库关联专利信息
|
|
|
- //projectPatentLinkService.updateProjectPatent(projectImportPatentVO.getProjectId(), patent.getId());
|
|
|
- //标引内容关联专利信息
|
|
|
- //projectFieldPatentLinkService.updateProjectFieldPatentLink(projectImportPatentVO, patent.getId());
|
|
|
- //文件夹管理
|
|
|
- //projectFolderPatentLinkService.updateProjectFolderLink(projectImportPatentVO, patent.getId());
|
|
|
- //自定义字段
|
|
|
- //patentService.updatePatentCustomField(patentCustomFieldParams);
|
|
|
- //标签
|
|
|
- //patentLabelService.updatePatentLabel(patentLabelParams);
|
|
|
-// WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
|
-// .setTaskId(params.getTaskId())
|
|
|
-// .setProjectId(projectImportPatentVO.getProjectId())
|
|
|
-// .setComplete(false)
|
|
|
-// .setIndex(i)
|
|
|
-// .setTaskType(Constants.TASK_IMPORT_PATENT)
|
|
|
-// .setPercentage(total == 0 ? 0 : Math.round((total.equals(i) ? (i * 1D) : (i + 1D)) / total * 100D))
|
|
|
-// .setFileName("")
|
|
|
-// .setOldName(params.getOldName())
|
|
|
-// .setUrl("")
|
|
|
-// .setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
|
- }
|
|
|
- }
|
|
|
-// SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(2, params.getTaskId());
|
|
|
-// WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
|
-// .setTaskId(params.getTaskId())
|
|
|
-// .setProjectId(projectImportPatentVO.getProjectId())
|
|
|
-// .setComplete(true)
|
|
|
-// .setIndex(total)
|
|
|
-// .setTaskType(Constants.TASK_IMPORT_PATENT)
|
|
|
-// .setPercentage(100L)
|
|
|
-// .setFileName("")
|
|
|
-// .setOldName(params.getOldName())
|
|
|
-// .setUrl("")
|
|
|
-// .setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(3, params.getTaskId());
|
|
|
- WebSocketServer.sendInfo(Response.error(ResponseEnum.PATENT_IMPORT_TASK_ERROR), params.getUserId());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
|
|
public void setImportPatentTaskStatus(Integer status, Integer taskId) {
|
|
|
taskService.updateStatus(taskId, status, DateUtils.getDateTime());
|
|
@@ -980,27 +552,27 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
WebSocketServer.sendInfo(Response.websocket(true, ResponseEnum.PROJECT_EXPORT_TASK_SUCCESS), String.valueOf(userId));
|
|
|
if (params.getProjectInfo()) {
|
|
|
Project project = this.getProjectById(params.getProjectId());
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_INFO_FILE_NAME, JsonUtils.objectToJson(project));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_INFO_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(project)));
|
|
|
}
|
|
|
if (params.getProjectReport() != null && params.getProjectReport().size() != 0) {
|
|
|
List<ProjectFile> projectFileList = projectFileService.getProjectFileByIds(params.getProjectReport());
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_REPORT_FILE_NAME, JsonUtils.objectToJson(projectFileList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_REPORT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFileList)));
|
|
|
projectFileList.forEach(item -> this.copyFileToTempDirectory(item.getUrl(), tempPath, Constants.PROJECT_REPORT_DIRECTORY_NAME, item.getFileName()));
|
|
|
}
|
|
|
if (params.getProjectFile() != null && params.getProjectFile().size() != 0) {
|
|
|
List<ProjectFile> projectFileList = projectFileService.getProjectFileByIds(params.getProjectFile());
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FILE_FILE_NAME, JsonUtils.objectToJson(projectFileList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FILE_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFileList)));
|
|
|
projectFileList.forEach(item -> this.copyFileToTempDirectory(item.getUrl(), tempPath, Constants.PROJECT_FILE_DIRECTORY_NAME, item.getFileName()));
|
|
|
}
|
|
|
if (params.getPatentImage()) {
|
|
|
List<PatentImage> patentImageList = patentImageService.getPatentImageByPatentIds(patentIds);
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_IMAGE_FILE_NAME, JsonUtils.objectToJson(patentImageList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_IMAGE_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentImageList)));
|
|
|
patentImageList.forEach(item -> this.copyFileToTempDirectory(item.getUrl(), tempPath, Constants.PATENT_IMAGE_DIRECTORY_NAME, item.getFileName()));
|
|
|
}
|
|
|
if (params.getPatentInstruction()) {
|
|
|
List<String> patentNo = patentList.stream().map(Patent::getPatentNo).collect(Collectors.toList());
|
|
|
List<PatentInstruction> patentInstructionList = patentInstructionService.getPatentInstructionByPatentNo(patentNo);
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_INSTRUCTION_FILE_NAME, JsonUtils.objectToJson(patentInstructionList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_INSTRUCTION_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentInstructionList)));
|
|
|
patentInstructionList.forEach(item -> this.copyFileToTempDirectory(item.getUrl(), tempPath, Constants.PATENT_INSTRUCTION_DIRECTORY_NAME, item.getFileName()));
|
|
|
}
|
|
|
if (params.getPatentBase()) {
|
|
@@ -1033,29 +605,29 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
List<PatentSimpleFamilyLink> patentSimpleFamilyLinkList = patentSimpleFamilyLinkService.getPatentSimpleFamilyLinkByFamilyIds(patentFamilyIds);
|
|
|
List<PatentSimpleFamily> patentSimpleFamilyList = patentSimpleFamilyService.getPatentSimpleFamilyByIds(patentFamilyIds);
|
|
|
List<PatentClassNumberLink> patentClassNumberLinkList = patentClassNumberLinkService.getPatentClassNumberLinkByPatentIds(patentIds);
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_FILE_NAME, JsonUtils.objectToJson(patentList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_AFFAIR_FILE_NAME, JsonUtils.objectToJson(patentAffairList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENCY_FILE_NAME, JsonUtils.objectToJson(patentAgencyList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENT_LINK_FILE_NAME, JsonUtils.objectToJson(patentAgentLinkList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENT_FILE_NAME, JsonUtils.objectToJson(patentAgentList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_INSTRUCTION_TEXT_FILE_NAME, JsonUtils.objectToJson(patentInstructionTextList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_LINK_FILE_NAME, JsonUtils.objectToJson(patentInventorLinkList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_FILE_NAME, JsonUtils.objectToJson(patentInventorList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_MERGE_FILE_NAME, JsonUtils.objectToJson(patentInventorMergeList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_LICENSOR_FILE_NAME, JsonUtils.objectToJson(patentLicensorList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_PLEDGE_FILE_NAME, JsonUtils.objectToJson(patentPledgeList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_RIGHT_FILE_NAME, JsonUtils.objectToJson(patentRightList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_FAMILY_LINK_FILE_NAME, JsonUtils.objectToJson(patentSimpleFamilyLinkList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_FAMILY_FILE_NAME, JsonUtils.objectToJson(patentSimpleFamilyList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_CLASS_NUMBER_FILE_NAME, JsonUtils.objectToJson(patentClassNumberLinkList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_FILE_NAME, JsonUtils.objectToJson(patentApplicantList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_LINK_FILE_NAME, JsonUtils.objectToJson(patentApplicantLinkList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_MERGE_LINK_FILE_NAME, JsonUtils.objectToJson(patentApplicantMergeLinkList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_AFFAIR_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentAffairList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENCY_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentAgencyList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENT_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentAgentLinkList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_AGENT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentAgentList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_INSTRUCTION_TEXT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentInstructionTextList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentInventorLinkList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentInventorList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_INVENTOR_MERGE_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentInventorMergeList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_LICENSOR_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentLicensorList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_PLEDGE_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentPledgeList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_RIGHT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentRightList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_FAMILY_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentSimpleFamilyLinkList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_FAMILY_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentSimpleFamilyList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_CLASS_NUMBER_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentClassNumberLinkList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentApplicantList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentApplicantLinkList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_APPLICANT_MERGE_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentApplicantMergeLinkList)));
|
|
|
}
|
|
|
if (params.getPatentField() != null && params.getPatentField().size() != 0) {
|
|
|
if (params.getPatentField().contains(0)) {
|
|
|
List<PatentLabel> patentLabelList = patentLabelService.getPatentLabelByPatentIdsAndProjectId(patentIds, params.getProjectId());
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_LABEL_FILE_NAME, JsonUtils.objectToJson(patentLabelList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_LABEL_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patentLabelList)));
|
|
|
}
|
|
|
List<ProjectField> projectFieldList = projectFieldService.getFieldListByIds(params.getPatentField());
|
|
|
List<Integer> projectFieldIds = projectFieldList.stream().map(ProjectField::getId).collect(Collectors.toList());
|
|
@@ -1066,14 +638,14 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
for (Integer fieldId : params.getPatentField()) {
|
|
|
projectFieldPatentLinkList.addAll(projectFieldPatentLinkService.getProjectPatentLinkByPatentIdsAndFieldId(patentIds, fieldId));
|
|
|
}
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_FILE_NAME, JsonUtils.objectToJson(projectFieldList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_OPTION_FILE_NAME, JsonUtils.objectToJson(projectFieldOptionList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_TREE_FILE_NAME, JsonUtils.objectToJson(projectFieldTreeList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_TEXT_FILE_NAME, JsonUtils.objectToJson(projectFieldTextList));
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_PATENT_LINK_FILE_NAME, JsonUtils.objectToJson(projectFieldPatentLinkList));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFieldList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_OPTION_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFieldOptionList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_TREE_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFieldTreeList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_TEXT_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFieldTextList)));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PROJECT_FIELD_PATENT_LINK_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(projectFieldPatentLinkList)));
|
|
|
}
|
|
|
List<Patent> patents = patentService.getPatentIdAndPatentNoByIds(patentIds);
|
|
|
- this.saveDataToJsonFile(tempPath, Constants.PATENT_ID_PATENT_NO_FILE_NAME, JsonUtils.objectToJson(patents));
|
|
|
+ this.saveDataToJsonFile(tempPath, Constants.PATENT_ID_PATENT_NO_FILE_NAME, Objects.requireNonNull(JsonUtils.objectToJson(patents)));
|
|
|
File file = ZipUtil.zip(tempPath, savePath);
|
|
|
FileUtil.del(tempPath);
|
|
|
ProjectExport projectExport = projectExportService.getById(exportId);
|
|
@@ -1183,7 +755,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
|
File file = new File(src);
|
|
|
FileReader fileReader = new FileReader(file);
|
|
|
Reader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8);
|
|
|
- int ch = 0;
|
|
|
+ int ch;
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
while ((ch = reader.read()) != -1) {
|
|
|
sb.append((char) ch);
|