|
@@ -32,8 +32,8 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
|
|
|
|
|
|
public List<PatentRight> getPatentRightByPatentNo(String patentNo) {
|
|
|
Patent patent = patentService.getByPatentNo(patentNo);
|
|
|
- if(patent==null){
|
|
|
- patent =new Patent();
|
|
|
+ if (patent == null) {
|
|
|
+ patent = new Patent();
|
|
|
}
|
|
|
LambdaQueryWrapper<PatentRight> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(PatentRight::getPatentId, patent.getId());
|
|
@@ -449,24 +449,16 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
|
|
|
*/
|
|
|
public void updatePatentRight(PatentRightParams params) {
|
|
|
try {
|
|
|
- //调用拆分权要工具类
|
|
|
-// List<PatentRight> patentRights = PatentRightUtils.formatPatentRight(params);
|
|
|
-//
|
|
|
-// if (patentRights.size() > 0) {
|
|
|
-// //删除库表中原有该权要
|
|
|
-// this.deleteByPatentId(params.getPatentId());
|
|
|
-// //权要数据入表"os_patent_right"
|
|
|
-// this.saveOrUpdateBatch(patentRights);
|
|
|
-// }
|
|
|
+
|
|
|
+ if (params.getContent() == null || params.getContent().trim().equals("")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
//不进行拆分,原文直接保存入库
|
|
|
PatentRight patentRight = new PatentRight()
|
|
|
.setPatentId(params.getPatentId())
|
|
|
.setContent(params.getContent())
|
|
|
.setContentOut(params.getContentOut());
|
|
|
- //.setType(1)
|
|
|
- //.setSort(0)
|
|
|
- //.setParentSort("-1");
|
|
|
if (patentRight.getContent() != null && !patentRight.getContent().equals("")) {
|
|
|
this.deleteByPatentId(patentRight.getPatentId());
|
|
|
this.saveOrUpdate(patentRight);
|