|
@@ -9,17 +9,18 @@ import cn.cslg.pas.common.model.vo.UploadParamsVO;
|
|
import cn.cslg.pas.common.model.vo.UploadSettingVO;
|
|
import cn.cslg.pas.common.model.vo.UploadSettingVO;
|
|
import cn.cslg.pas.common.utils.*;
|
|
import cn.cslg.pas.common.utils.*;
|
|
import cn.cslg.pas.domain.*;
|
|
import cn.cslg.pas.domain.*;
|
|
|
|
+import cn.cslg.pas.mapper.ImportErrorLogMapper;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.apache.poi.ss.usermodel.PictureData;
|
|
import org.apache.poi.ss.usermodel.PictureData;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
-import java.util.Collections;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@@ -44,6 +45,8 @@ public class UploadPatentBatchService {
|
|
private final PatentLabelService patentLabelService;
|
|
private final PatentLabelService patentLabelService;
|
|
private final PatentClassNumberLinkService patentClassNumberLinkService;
|
|
private final PatentClassNumberLinkService patentClassNumberLinkService;
|
|
private final PatentAffairService patentAffairService;
|
|
private final PatentAffairService patentAffairService;
|
|
|
|
+ private final ImportErrorLogMapper importErrorLogMapper;
|
|
|
|
+ private static int FLAG = 0;
|
|
|
|
|
|
@Async("singleThreadAsyncTaskExecutor")
|
|
@Async("singleThreadAsyncTaskExecutor")
|
|
public void uploadPatentBatch(TaskParams params, ProjectImportPatentVO projectImportPatentVO) {
|
|
public void uploadPatentBatch(TaskParams params, ProjectImportPatentVO projectImportPatentVO) {
|
|
@@ -84,6 +87,7 @@ public class UploadPatentBatchService {
|
|
//将装配对象中的数据保存到数据库
|
|
//将装配对象中的数据保存到数据库
|
|
dataToDB(params, uploadParamsVO, projectImportPatentVO);
|
|
dataToDB(params, uploadParamsVO, projectImportPatentVO);
|
|
|
|
|
|
|
|
+ //通过WebSocket 在每一次循环结束后 向前端发送完成进度
|
|
WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
.setTaskId(params.getTaskId())
|
|
.setTaskId(params.getTaskId())
|
|
.setProjectId(projectImportPatentVO.getProjectId())
|
|
.setProjectId(projectImportPatentVO.getProjectId())
|
|
@@ -96,6 +100,7 @@ public class UploadPatentBatchService {
|
|
.setUrl("")
|
|
.setUrl("")
|
|
.setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
.setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
}
|
|
}
|
|
|
|
+
|
|
SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(2, params.getTaskId());
|
|
SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(2, params.getTaskId());
|
|
WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
|
|
.setTaskId(params.getTaskId())
|
|
.setTaskId(params.getTaskId())
|
|
@@ -110,6 +115,12 @@ public class UploadPatentBatchService {
|
|
.setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
.setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), params.getUserId());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
|
+ SpringUtil.getBean(ProjectService.class).setImportPatentTaskStatus(3, params.getTaskId());
|
|
|
|
+ if (FLAG > 0) {
|
|
|
|
+ int successCount = total - FLAG;
|
|
|
|
+ WebSocketServer.sendInfo(Response.error("部分数据上传成功" + "\n" + "成功条数:" + successCount + "失败条数:" + FLAG), params.getUserId());
|
|
|
|
+ }
|
|
|
|
+ FLAG = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -119,73 +130,84 @@ public class UploadPatentBatchService {
|
|
* @name 数据库交互
|
|
* @name 数据库交互
|
|
* @description 将装配完毕的VO类向数据库中不同的表进行添加或修改操作
|
|
* @description 将装配完毕的VO类向数据库中不同的表进行添加或修改操作
|
|
*/
|
|
*/
|
|
- private void dataToDB(TaskParams params, UploadParamsVO uploadParamsVO, ProjectImportPatentVO projectImportPatentVO) {
|
|
|
|
- //专利信息 OS_PATENT
|
|
|
|
- if (uploadParamsVO.getPatent() != null) {
|
|
|
|
- uploadParamsVO.getPatent().updateById();
|
|
|
|
- }
|
|
|
|
- //权利要求 OS_PATENT_RIGHT
|
|
|
|
- if (uploadParamsVO.getPatentRight() != null && uploadParamsVO.getSelfContent() != null) {
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public void dataToDB(TaskParams params, UploadParamsVO uploadParamsVO, ProjectImportPatentVO projectImportPatentVO) {
|
|
|
|
+ try {
|
|
|
|
+ //专利信息 OS_PATENT
|
|
|
|
+ if (uploadParamsVO.getPatent() != null) {
|
|
|
|
+ List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList(Constants.PATENT_SIMPLE_STATUS));
|
|
|
|
+ Integer simpleStatus = Integer.parseInt(systemDictList.stream()
|
|
|
|
+ .filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getLabel().equals(uploadParamsVO.getPatentSimpleStatus()))
|
|
|
|
+ .findFirst()
|
|
|
|
+ .orElse(new SystemDict()).getValue());
|
|
|
|
+ uploadParamsVO.getPatent().setSimpleStatus(simpleStatus);
|
|
|
|
+ uploadParamsVO.getPatent().updateById();
|
|
|
|
+ }
|
|
|
|
+ //权利要求 OS_PATENT_RIGHT
|
|
patentRightBusiness(uploadParamsVO);
|
|
patentRightBusiness(uploadParamsVO);
|
|
- }
|
|
|
|
- //说明书(文本) OS_PATENT_INSTRUCTION_TEXT
|
|
|
|
- if (uploadParamsVO.getPatentInstructionText() != null) {
|
|
|
|
- patentInstructionTextBusiness(uploadParamsVO);
|
|
|
|
- }
|
|
|
|
- //代理人 OS_PATENT_AGENT
|
|
|
|
- if (uploadParamsVO.getPatentAgentList() != null) {
|
|
|
|
- patentAgentBusiness(uploadParamsVO);
|
|
|
|
- }
|
|
|
|
- //质押质权人 OS_PATENT_PLEDGE
|
|
|
|
- if (uploadParamsVO.getPatentPledgeList() != null) {
|
|
|
|
- patentPledgeBusiness(uploadParamsVO);
|
|
|
|
- }
|
|
|
|
- //许可人 OS_PATENT_LICENSOR
|
|
|
|
- if (uploadParamsVO.getPatentLicensorList() != null) {
|
|
|
|
- patentLicensorBusiness(uploadParamsVO);
|
|
|
|
- }
|
|
|
|
- //简单同族 OS_PATENT_SIMPLEFAMILY
|
|
|
|
- if (uploadParamsVO.getSimpleFamily() != null && uploadParamsVO.getPatSnapFamily() != null && uploadParamsVO.getInpadocFamily() != null) {
|
|
|
|
|
|
+ //说明书(文本) OS_PATENT_INSTRUCTION_TEXT
|
|
|
|
+ if (uploadParamsVO.getPatentInstructionText() != null) {
|
|
|
|
+ patentInstructionTextBusiness(uploadParamsVO);
|
|
|
|
+ }
|
|
|
|
+ //代理人 OS_PATENT_AGENT
|
|
|
|
+ if (uploadParamsVO.getPatentAgentList() != null) {
|
|
|
|
+ patentAgentBusiness(uploadParamsVO);
|
|
|
|
+ }
|
|
|
|
+ //质押质权人 OS_PATENT_PLEDGE
|
|
|
|
+ if (uploadParamsVO.getPatentPledgeList() != null) {
|
|
|
|
+ patentPledgeBusiness(uploadParamsVO);
|
|
|
|
+ }
|
|
|
|
+ //许可人 OS_PATENT_LICENSOR
|
|
|
|
+ if (uploadParamsVO.getPatentLicensorList() != null) {
|
|
|
|
+ patentLicensorBusiness(uploadParamsVO);
|
|
|
|
+ }
|
|
|
|
+ //简单同族 OS_PATENT_SIMPLEFAMILY
|
|
patentSimplyFamilyBusiness(uploadParamsVO);
|
|
patentSimplyFamilyBusiness(uploadParamsVO);
|
|
- }
|
|
|
|
- //发明人 OS_PATENT_INVENTOR
|
|
|
|
- if (uploadParamsVO.getPatentInventorList() != null && uploadParamsVO.getFirstName() != null && uploadParamsVO.getFirstAddress() != null) {
|
|
|
|
|
|
+ //发明人 OS_PATENT_INVENTOR
|
|
patentInventorBusiness(uploadParamsVO);
|
|
patentInventorBusiness(uploadParamsVO);
|
|
- }
|
|
|
|
-// //申请人/权利人 OS_APPLICATION_ATTR
|
|
|
|
-// //权利人
|
|
|
|
-// patentCurrentApplicationBusiness(uploadParamsVO);
|
|
|
|
-// //申请人
|
|
|
|
-// patentOriginalApplicationBusiness(uploadParamsVO);
|
|
|
|
- //专题库关联专利信息 OS_THEMATIC_PID
|
|
|
|
- if (uploadParamsVO.getPatent() != null) {
|
|
|
|
- patentThematicPidBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //标引内容关联专利信息 OS_PATENT_FIELD_PATENT_LINK
|
|
|
|
- if (uploadParamsVO.getPatent() != null) {
|
|
|
|
-
|
|
|
|
- patentProjectFieldPatentLinkBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
- }
|
|
|
|
- //文件夹管理 OS_PORTFOLIO_LINK
|
|
|
|
- if (uploadParamsVO.getPatent() != null) {
|
|
|
|
- patentProjectFolderPatentLinkBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
- }
|
|
|
|
- //标签 OS_PATENT_LABEL
|
|
|
|
- if (uploadParamsVO.getPatentLabelList() != null) {
|
|
|
|
- patentLabelBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
- }
|
|
|
|
- //分类号关联 OS_PATENT_TYPENO
|
|
|
|
- if (uploadParamsVO.getMainIpc() != null && uploadParamsVO.getMainUpc() != null && uploadParamsVO.getCpcList() != null && uploadParamsVO.getLocList() != null && uploadParamsVO.getUpcList() != null && uploadParamsVO.getIpcList() != null) {
|
|
|
|
|
|
+ //申请人/权利人 OS_APPLICATION_ATTR
|
|
|
|
+ //权利人
|
|
|
|
+ //patentCurrentApplicationBusiness(uploadParamsVO);
|
|
|
|
+ //申请人
|
|
|
|
+ //patentOriginalApplicationBusiness(uploadParamsVO);
|
|
|
|
+ //专题库关联专利信息 OS_THEMATIC_PID
|
|
|
|
+ if (uploadParamsVO.getPatent() != null) {
|
|
|
|
+ patentThematicPidBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
+ }
|
|
|
|
+ //标引内容关联专利信息 OS_PATENT_FIELD_PATENT_LINK
|
|
|
|
+ if (uploadParamsVO.getPatent() != null) {
|
|
|
|
+ patentProjectFieldPatentLinkBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
+ }
|
|
|
|
+ //文件夹管理 OS_PORTFOLIO_LINK
|
|
|
|
+ if (uploadParamsVO.getPatent() != null) {
|
|
|
|
+ patentProjectFolderPatentLinkBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
+ }
|
|
|
|
+ //标签 OS_PATENT_LABEL
|
|
|
|
+ if (uploadParamsVO.getPatentLabelList() != null) {
|
|
|
|
+ patentLabelBusiness(uploadParamsVO, projectImportPatentVO);
|
|
|
|
+ }
|
|
|
|
+ //分类号关联 OS_PATENT_TYPENO
|
|
patentTypeNoBusiness(uploadParamsVO);
|
|
patentTypeNoBusiness(uploadParamsVO);
|
|
- }
|
|
|
|
- //事务信息 OS_PATENT_AFFAIR
|
|
|
|
- if (uploadParamsVO.getPatentAffair() != null && uploadParamsVO.getSimpleStatus() != null) {
|
|
|
|
|
|
+ //事务信息 OS_PATENT_AFFAIR
|
|
patentAffairBusiness(uploadParamsVO);
|
|
patentAffairBusiness(uploadParamsVO);
|
|
- }
|
|
|
|
- //自定义字段
|
|
|
|
- if (uploadParamsVO.getKey() != null && uploadParamsVO.getFieldList() != null) {
|
|
|
|
- patentFieldBusiness(params, uploadParamsVO, projectImportPatentVO);
|
|
|
|
|
|
+ //自定义字段
|
|
|
|
+ if (uploadParamsVO.getKey() != null && uploadParamsVO.getFieldList() != null) {
|
|
|
|
+ patentFieldBusiness(params, uploadParamsVO, projectImportPatentVO);
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ if (uploadParamsVO.getPatent() != null) {
|
|
|
|
+ ImportErrorLog importErrorLog = new ImportErrorLog();
|
|
|
|
+ importErrorLog.setPatentId(uploadParamsVO.getPatent().getId())
|
|
|
|
+ .setPatentNo(uploadParamsVO.getPatent().getPatentNo())
|
|
|
|
+ .setCreateTime(new SimpleDateFormat("yyyy-MM-dd 24HI:mm:ss").format(new Date()))
|
|
|
|
+ .setCreateUserId(Integer.parseInt(params.getUserId()))
|
|
|
|
+ .setMistakeMessage(e.getMessage())
|
|
|
|
+ .setProjectId(params.getProjectId());
|
|
|
|
+ importErrorLogMapper.insert(importErrorLog);
|
|
|
|
+ FLAG += 1;
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -212,10 +234,13 @@ public class UploadPatentBatchService {
|
|
PatentRightParams patentRightParams = new PatentRightParams();
|
|
PatentRightParams patentRightParams = new PatentRightParams();
|
|
patentRightParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentRightParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentRightParams.setPatentNo(uploadParamsVO.getPatent().getPatentNo());
|
|
patentRightParams.setPatentNo(uploadParamsVO.getPatent().getPatentNo());
|
|
- patentRightParams.setContent(uploadParamsVO.getPatentRight().getContent());
|
|
|
|
- patentRightParams.setContentOut(uploadParamsVO.getPatentRight().getContentOut());
|
|
|
|
- patentRightParams.setSelfContent(uploadParamsVO.getSelfContent());
|
|
|
|
-
|
|
|
|
|
|
+ if (uploadParamsVO.getPatentRight() != null) {
|
|
|
|
+ patentRightParams.setContent(uploadParamsVO.getPatentRight().getContent());
|
|
|
|
+ patentRightParams.setContentOut(uploadParamsVO.getPatentRight().getContentOut());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getSelfContent() != null) {
|
|
|
|
+ patentRightParams.setSelfContent(uploadParamsVO.getSelfContent());
|
|
|
|
+ }
|
|
patentRightService.updatePatentRight(patentRightParams);
|
|
patentRightService.updatePatentRight(patentRightParams);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -265,28 +290,38 @@ public class UploadPatentBatchService {
|
|
|
|
|
|
private void patentSimplyFamilyBusiness(UploadParamsVO uploadParamsVO) {
|
|
private void patentSimplyFamilyBusiness(UploadParamsVO uploadParamsVO) {
|
|
PatentSimpleFamilyParams patentSimpleFamilyParams = new PatentSimpleFamilyParams();
|
|
PatentSimpleFamilyParams patentSimpleFamilyParams = new PatentSimpleFamilyParams();
|
|
|
|
+ if (uploadParamsVO.getSimpleFamily() != null) {
|
|
|
|
+ patentSimpleFamilyParams.setSimpleFamily(uploadParamsVO.getSimpleFamily());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getPatSnapFamily() != null) {
|
|
|
|
+ patentSimpleFamilyParams.setPatSnapFamily(uploadParamsVO.getPatSnapFamily());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getInpadocFamily() != null) {
|
|
|
|
+ patentSimpleFamilyParams.setInpadocFamily(uploadParamsVO.getInpadocFamily());
|
|
|
|
+ }
|
|
patentSimpleFamilyParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentSimpleFamilyParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentSimpleFamilyParams.setPatentNo(uploadParamsVO.getPatent().getPatentNo());
|
|
patentSimpleFamilyParams.setPatentNo(uploadParamsVO.getPatent().getPatentNo());
|
|
- patentSimpleFamilyParams.setSimpleFamily(uploadParamsVO.getSimpleFamily());
|
|
|
|
- patentSimpleFamilyParams.setPatSnapFamily(uploadParamsVO.getPatSnapFamily());
|
|
|
|
- patentSimpleFamilyParams.setInpadocFamily(uploadParamsVO.getInpadocFamily());
|
|
|
|
|
|
|
|
patentSimpleFamilyService.updatePatentSimpleFamily(patentSimpleFamilyParams);
|
|
patentSimpleFamilyService.updatePatentSimpleFamily(patentSimpleFamilyParams);
|
|
}
|
|
}
|
|
|
|
|
|
private void patentInventorBusiness(UploadParamsVO uploadParamsVO) {
|
|
private void patentInventorBusiness(UploadParamsVO uploadParamsVO) {
|
|
PatentInventorParams patentInventorParams = new PatentInventorParams();
|
|
PatentInventorParams patentInventorParams = new PatentInventorParams();
|
|
|
|
+ if (uploadParamsVO.getPatentInventorList() != null) {
|
|
|
|
+ List<String> addressList = uploadParamsVO.getPatentInventorList().stream().map(PatentInventor::getAddress).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
+ patentInventorParams.setAddressList(addressList);
|
|
|
|
+ List<String> nameList = uploadParamsVO.getPatentInventorList().stream().map(PatentInventor::getName).collect(Collectors.toList());
|
|
|
|
+ patentInventorParams.setNameList(nameList);
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getFirstName() != null) {
|
|
|
|
+ patentInventorParams.setFirstName(uploadParamsVO.getFirstName());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getFirstAddress() != null) {
|
|
|
|
+ patentInventorParams.setFirstAddress(uploadParamsVO.getFirstAddress());
|
|
|
|
+ }
|
|
patentInventorParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentInventorParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
- patentInventorParams.setFirstName(uploadParamsVO.getFirstName());
|
|
|
|
- patentInventorParams.setFirstAddress(uploadParamsVO.getFirstAddress());
|
|
|
|
- List<String> addressList = uploadParamsVO.getPatentInventorList().stream().map(PatentInventor::getAddress).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
- patentInventorParams.setAddressList(addressList);
|
|
|
|
- List<String> nameList = uploadParamsVO.getPatentInventorList().stream().map(PatentInventor::getName).collect(Collectors.toList());
|
|
|
|
- patentInventorParams.setNameList(nameList);
|
|
|
|
|
|
|
|
patentInventorService.updatePatentInventor(patentInventorParams);
|
|
patentInventorService.updatePatentInventor(patentInventorParams);
|
|
-
|
|
|
|
- //patentInventorService.updatePatentInventorAddress(patentInventorAddressParams);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void patentCurrentApplicationBusiness(UploadParamsVO uploadParamsVO) {
|
|
private void patentCurrentApplicationBusiness(UploadParamsVO uploadParamsVO) {
|
|
@@ -321,29 +356,45 @@ public class UploadPatentBatchService {
|
|
|
|
|
|
private void patentTypeNoBusiness(UploadParamsVO uploadParamsVO) {
|
|
private void patentTypeNoBusiness(UploadParamsVO uploadParamsVO) {
|
|
PatentClassNumberParams patentClassNumberParams = new PatentClassNumberParams();
|
|
PatentClassNumberParams patentClassNumberParams = new PatentClassNumberParams();
|
|
|
|
+ if (uploadParamsVO.getMainIpc() != null) {
|
|
|
|
+ patentClassNumberParams.setMainIpc(uploadParamsVO.getMainIpc());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getMainUpc() != null) {
|
|
|
|
+ patentClassNumberParams.setMainUpc(uploadParamsVO.getMainUpc());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getCpcList() != null) {
|
|
|
|
+ patentClassNumberParams.setCpcList(uploadParamsVO.getCpcList());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getLocList() != null) {
|
|
|
|
+ patentClassNumberParams.setLocList(uploadParamsVO.getLocList());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getUpcList() != null) {
|
|
|
|
+ patentClassNumberParams.setUpcList(uploadParamsVO.getUpcList());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getIpcList() != null) {
|
|
|
|
+ patentClassNumberParams.setIpcList(uploadParamsVO.getIpcList());
|
|
|
|
+ }
|
|
patentClassNumberParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentClassNumberParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
- patentClassNumberParams.setCpcList(uploadParamsVO.getCpcList());
|
|
|
|
- patentClassNumberParams.setIpcList(uploadParamsVO.getIpcList());
|
|
|
|
- patentClassNumberParams.setLocList(uploadParamsVO.getLocList());
|
|
|
|
- patentClassNumberParams.setIpcList(uploadParamsVO.getIpcList());
|
|
|
|
- patentClassNumberParams.setMainIpc(uploadParamsVO.getMainIpc());
|
|
|
|
- patentClassNumberParams.setMainUpc(uploadParamsVO.getMainUpc());
|
|
|
|
|
|
|
|
patentClassNumberLinkService.updatePatentClassNumberLink(patentClassNumberParams);
|
|
patentClassNumberLinkService.updatePatentClassNumberLink(patentClassNumberParams);
|
|
}
|
|
}
|
|
|
|
|
|
private void patentAffairBusiness(UploadParamsVO uploadParamsVO) {
|
|
private void patentAffairBusiness(UploadParamsVO uploadParamsVO) {
|
|
PatentAffairParams patentAffairParams = new PatentAffairParams();
|
|
PatentAffairParams patentAffairParams = new PatentAffairParams();
|
|
|
|
+ if (uploadParamsVO.getPatentAffair() != null) {
|
|
|
|
+ patentAffairParams.setContent(uploadParamsVO.getPatentAffair().getContent());
|
|
|
|
+ patentAffairParams.setStatusList(uploadParamsVO.getPatentAffair().getStatus());
|
|
|
|
+ patentAffairParams.setDateTime(uploadParamsVO.getPatentAffair().getDateTime());
|
|
|
|
+ }
|
|
|
|
+ if (uploadParamsVO.getSimpleStatus() != null) {
|
|
|
|
+ List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList(Constants.PATENT_SIMPLE_STATUS));
|
|
|
|
+ Integer simpleStatus = Integer.parseInt(systemDictList.stream()
|
|
|
|
+ .filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getLabel().equals(uploadParamsVO.getSimpleStatus()))
|
|
|
|
+ .findFirst()
|
|
|
|
+ .orElse(new SystemDict()).getValue());
|
|
|
|
+ patentAffairParams.setSimpleStatus(simpleStatus);
|
|
|
|
+ }
|
|
patentAffairParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
patentAffairParams.setPatentId(uploadParamsVO.getPatent().getId());
|
|
- patentAffairParams.setContent(uploadParamsVO.getPatentAffair().getContent());
|
|
|
|
- List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList(Constants.PATENT_SIMPLE_STATUS));
|
|
|
|
- Integer simpleStatus = Integer.parseInt(systemDictList.stream()
|
|
|
|
- .filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getLabel().equals(uploadParamsVO.getSimpleStatus()))
|
|
|
|
- .findFirst()
|
|
|
|
- .orElse(new SystemDict()).getValue());
|
|
|
|
- patentAffairParams.setSimpleStatus(simpleStatus);
|
|
|
|
- patentAffairParams.setStatusList(uploadParamsVO.getPatentAffair().getStatus());
|
|
|
|
- patentAffairParams.setDateTime(uploadParamsVO.getPatentAffair().getDateTime());
|
|
|
|
|
|
|
|
patentAffairService.updatePatientAffair(patentAffairParams);
|
|
patentAffairService.updatePatientAffair(patentAffairParams);
|
|
}
|
|
}
|
|
@@ -359,4 +410,3 @@ public class UploadPatentBatchService {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|