chendayu 2 anni fa
parent
commit
d4f40c88c7

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

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