|
@@ -664,7 +664,7 @@ public class UploadPatentBatchService {
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String dataToDBCell(PatentCell patentCell) throws ParseException {
|
|
public String dataToDBCell(PatentCell patentCell) throws ParseException {
|
|
UploadParamsVO uploadParamsVO = new UploadParamsVO();
|
|
UploadParamsVO uploadParamsVO = new UploadParamsVO();
|
|
- Patent patent =new Patent();
|
|
|
|
|
|
+ Patent patent = new Patent();
|
|
//设置专利号
|
|
//设置专利号
|
|
patent.setPatentNo(patentCell.getPatentNo());
|
|
patent.setPatentNo(patentCell.getPatentNo());
|
|
//设置摘要
|
|
//设置摘要
|
|
@@ -673,7 +673,7 @@ public class UploadPatentBatchService {
|
|
patent.setName(patentCell.getTitle());
|
|
patent.setName(patentCell.getTitle());
|
|
//设置公开日
|
|
//设置公开日
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
|
|
- if(patentCell.getPubilcDate()!=null) {
|
|
|
|
|
|
+ if (patentCell.getPubilcDate() != null) {
|
|
Date date = simpleDateFormat.parse(patentCell.getPubilcDate());
|
|
Date date = simpleDateFormat.parse(patentCell.getPubilcDate());
|
|
Integer ts = (int) date.getTime();
|
|
Integer ts = (int) date.getTime();
|
|
patent.setPublicDate(ts);
|
|
patent.setPublicDate(ts);
|
|
@@ -681,7 +681,7 @@ public class UploadPatentBatchService {
|
|
//设置申请号
|
|
//设置申请号
|
|
patent.setApplicationNo(patentCell.getApplicationNo());
|
|
patent.setApplicationNo(patentCell.getApplicationNo());
|
|
//设置申请日
|
|
//设置申请日
|
|
- if(patentCell.getApplicationDate()!=null) {
|
|
|
|
|
|
+ if (patentCell.getApplicationDate() != null) {
|
|
Date date = simpleDateFormat.parse(patentCell.getApplicationDate());
|
|
Date date = simpleDateFormat.parse(patentCell.getApplicationDate());
|
|
Integer ts = (int) date.getTime();
|
|
Integer ts = (int) date.getTime();
|
|
patent.setApplicationDate(ts);
|
|
patent.setApplicationDate(ts);
|
|
@@ -689,7 +689,7 @@ public class UploadPatentBatchService {
|
|
//设置摘要附图
|
|
//设置摘要附图
|
|
patent.setAbstractPath(patentCell.getPicUrl());
|
|
patent.setAbstractPath(patentCell.getPicUrl());
|
|
//设置pdf文档
|
|
//设置pdf文档
|
|
- patentInstructionService.edit( patentCell.getPatentNo(),patentCell.getPdf());
|
|
|
|
|
|
+ patentInstructionService.edit(patentCell.getPatentNo(), patentCell.getPdf());
|
|
//设置公开号
|
|
//设置公开号
|
|
patent.setPublicNo(patentCell.getPublicNo());
|
|
patent.setPublicNo(patentCell.getPublicNo());
|
|
uploadParamsVO.setSimpleStatus(patentCell.getStatue());
|
|
uploadParamsVO.setSimpleStatus(patentCell.getStatue());
|
|
@@ -722,7 +722,7 @@ public class UploadPatentBatchService {
|
|
patentInstructionTextBusiness(uploadParamsVO);
|
|
patentInstructionTextBusiness(uploadParamsVO);
|
|
}
|
|
}
|
|
//发明人 OS_PATENT_INVENTOR
|
|
//发明人 OS_PATENT_INVENTOR
|
|
- if(patentCell.getInventors().size()!=0) {
|
|
|
|
|
|
+ if (patentCell.getInventors().size() != 0) {
|
|
PatentInventorParams patentInventorParams = new PatentInventorParams();
|
|
PatentInventorParams patentInventorParams = new PatentInventorParams();
|
|
patentInventorParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentInventorParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentInventorParams.setNameList(patentCell.getInventors());
|
|
patentInventorParams.setNameList(patentCell.getInventors());
|
|
@@ -741,19 +741,19 @@ public class UploadPatentBatchService {
|
|
uploadParamsVO.setMainIpc(patentCell.getMainIpc());
|
|
uploadParamsVO.setMainIpc(patentCell.getMainIpc());
|
|
patentTypeNoBusiness(uploadParamsVO);
|
|
patentTypeNoBusiness(uploadParamsVO);
|
|
//代理人 OS_PATENT_AGENT
|
|
//代理人 OS_PATENT_AGENT
|
|
- if(patentCell.getAgencyPersons()!=null&&patentCell.getAgencyPersons().size()!=0) {
|
|
|
|
|
|
+ if (patentCell.getAgencyPersons() != null && patentCell.getAgencyPersons().size() != 0) {
|
|
PatentAgentParams patentAgentParams = new PatentAgentParams();
|
|
PatentAgentParams patentAgentParams = new PatentAgentParams();
|
|
patentAgentParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentAgentParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentAgentParams.setAgent(patentCell.getAgencyPersons());
|
|
patentAgentParams.setAgent(patentCell.getAgencyPersons());
|
|
patentAgentService.updatePatentAgent(patentAgentParams);
|
|
patentAgentService.updatePatentAgent(patentAgentParams);
|
|
}
|
|
}
|
|
//事务信息 OS_PATENT_AFFAIR
|
|
//事务信息 OS_PATENT_AFFAIR
|
|
- if(patentCell.getPatentAffairs()!=null&&patentCell.getPatentAffairs().size()>0) {
|
|
|
|
|
|
+ if (patentCell.getPatentAffairs() != null && patentCell.getPatentAffairs().size() > 0) {
|
|
patentAffairService.updatePatientAffairs(patentCell.getPatentAffairs(), uploadParamsVO.getPatent().getId());
|
|
patentAffairService.updatePatientAffairs(patentCell.getPatentAffairs(), uploadParamsVO.getPatent().getId());
|
|
}
|
|
}
|
|
//当专题库id不为null时添加专利到专题库
|
|
//当专题库id不为null时添加专利到专题库
|
|
- if(patentCell.getProjectId()!=null){
|
|
|
|
- projectPatentLinkService.updateProjectPatent(patentCell.getProjectId(),uploadParamsVO.getPatent().getId());
|
|
|
|
|
|
+ if (patentCell.getProjectId() != null) {
|
|
|
|
+ projectPatentLinkService.updateProjectPatent(patentCell.getProjectId(), uploadParamsVO.getPatent().getId());
|
|
}
|
|
}
|
|
return Response.success();
|
|
return Response.success();
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|