|
@@ -48,35 +48,38 @@ public class GetPatentStarPartService {
|
|
|
public PatentDTO getPatentPart(GetPatentStarPartDTO getPatentStarPartDTO) throws IOException, SQLException {
|
|
|
log.info("开始处理【根据专利号或申请号获取专利指定部分项】的业务,参数为:{}", getPatentStarPartDTO);
|
|
|
|
|
|
- //先根据申请号 appNo 检索出专利,获得原始申请号 rowAppNo
|
|
|
- PatentStarListDto patentStarListDto = new PatentStarListDto()
|
|
|
- .setCurrentQuery("AN=" + getPatentStarPartDTO.getAppNo())
|
|
|
- .setOrderBy("AD")
|
|
|
- .setOrderByType("DESC")
|
|
|
- .setPageNum(1)
|
|
|
- .setRowCount(10)
|
|
|
- .setDBType("CN");
|
|
|
- //调用一般接口返回一批专利著录相关数据
|
|
|
- Map<String, Object> resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
|
|
|
- if (resultMap == null || (Integer) resultMap.get("total") == 0) {
|
|
|
- ThrowException.throwXiaoShiException("未检索到相关专利");
|
|
|
+ //对于中国专利,检索权要、说明书文本、说明书pdf时,使用原始申请号
|
|
|
+ if (getPatentStarPartDTO.getPatentNo().contains("CN") && getPatentStarPartDTO.getAppNo().contains("CN")) {
|
|
|
+ //根据申请号 appNo 检索出该专利,获得其原始申请号 rowAppNo
|
|
|
+ PatentStarListDto patentStarListDto = new PatentStarListDto()
|
|
|
+ .setCurrentQuery("AN=" + getPatentStarPartDTO.getAppNo())
|
|
|
+ .setOrderBy("AD")
|
|
|
+ .setOrderByType("DESC")
|
|
|
+ .setPageNum(1)
|
|
|
+ .setRowCount(10)
|
|
|
+ .setDBType("CN");
|
|
|
+ //调用一般接口返回一批专利著录相关数据
|
|
|
+ Map<String, Object> resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
|
|
|
+ if (resultMap != null && (Integer) resultMap.get("total") != 0) {
|
|
|
+ List<StarPatentVO> starPatents = (List<StarPatentVO>) resultMap.get("records");
|
|
|
+ getPatentStarPartDTO.setRowAppNo(starPatents.get(0).getRowApplicationNo());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- List<StarPatentVO> starPatents = (List<StarPatentVO>) resultMap.get("records");
|
|
|
- getPatentStarPartDTO.setRowAppNo(starPatents.get(0).getRowApplicationNo());
|
|
|
|
|
|
PatentDTO patentDTO;
|
|
|
- if (getPatentStarPartDTO.getPatentCell() == 1) {
|
|
|
- patentDTO = getParentRight(getPatentStarPartDTO); //拿权要
|
|
|
- } else if (getPatentStarPartDTO.getPatentCell() == 2) {
|
|
|
- patentDTO = getInstructionText(getPatentStarPartDTO); //拿说明书文本
|
|
|
- } else if (getPatentStarPartDTO.getPatentCell() == 3) {
|
|
|
- patentDTO = getInstructionPDF(getPatentStarPartDTO); //拿说明书pdf
|
|
|
- } else if (getPatentStarPartDTO.getPatentCell() == 4) {
|
|
|
- patentDTO = getPatentImage(getPatentStarPartDTO); //拿摘要附图
|
|
|
- } else if (getPatentStarPartDTO.getPatentCell() == 5) {
|
|
|
- patentDTO = getSimpleFamily(getPatentStarPartDTO); //拿同族专利信息
|
|
|
- } else if (getPatentStarPartDTO.getPatentCell() == 6) {
|
|
|
- patentDTO = getAffair(getPatentStarPartDTO); //拿法律事务信息
|
|
|
+ if (getPatentStarPartDTO.getPatentCell() == 1) { //拿权要
|
|
|
+ patentDTO = getParentRight(getPatentStarPartDTO);
|
|
|
+ } else if (getPatentStarPartDTO.getPatentCell() == 2) { //拿说明书文本
|
|
|
+ patentDTO = getInstructionText(getPatentStarPartDTO);
|
|
|
+ } else if (getPatentStarPartDTO.getPatentCell() == 3) { //拿说明书pdf
|
|
|
+ patentDTO = getInstructionPDF(getPatentStarPartDTO);
|
|
|
+ } else if (getPatentStarPartDTO.getPatentCell() == 4) { //拿摘要附图
|
|
|
+ patentDTO = getPatentImage(getPatentStarPartDTO);
|
|
|
+ } else if (getPatentStarPartDTO.getPatentCell() == 5) { //拿同族专利信息
|
|
|
+ patentDTO = getSimpleFamily(getPatentStarPartDTO);
|
|
|
+ } else if (getPatentStarPartDTO.getPatentCell() == 6) { //拿法律事务信息
|
|
|
+ patentDTO = getAffair(getPatentStarPartDTO);
|
|
|
} else {
|
|
|
patentDTO = new PatentDTO();
|
|
|
}
|