|
@@ -42,9 +42,11 @@ public class CompareRecordsService extends ServiceImpl<CompareRecordsMapper, Com
|
|
|
this.removeById(id);
|
|
|
return Response.success();
|
|
|
}
|
|
|
+ @Transactional
|
|
|
public String updateCompareRecords(CompareRecords compareRecord)throws IOException{
|
|
|
- compareRecord.setFeaturesId(StringUtils.join(compareRecord.getFeaturesIdList(),","));
|
|
|
- compareRecord.updateById();
|
|
|
+ String str = StringUtils.join(compareRecord.getFeaturesIdList(), ",");
|
|
|
+ Integer id = compareRecord.getId();
|
|
|
+ compareRecordsMapper.updateCompareRecords(str,id);
|
|
|
return Response.success();
|
|
|
}
|
|
|
public String getCompareRecords(int reportId,String patentNo,int personId)throws IOException{
|
|
@@ -52,6 +54,9 @@ public class CompareRecordsService extends ServiceImpl<CompareRecordsMapper, Com
|
|
|
List<CompareRecords> list=new ArrayList<>();
|
|
|
for(CompareRecords c:compareRecords){
|
|
|
String featuresId = c.getFeaturesId();
|
|
|
+ if(featuresId==null){
|
|
|
+ return Response.success(compareRecords);
|
|
|
+ }
|
|
|
List<CompareRecords.CY> list1=new ArrayList<>();
|
|
|
String[] split = featuresId.split(",");
|
|
|
for(String str :split){
|
|
@@ -80,6 +85,9 @@ public class CompareRecordsService extends ServiceImpl<CompareRecordsMapper, Com
|
|
|
for(CompareRecords a:compareRecords1){
|
|
|
CompareRecords compareRecords2=new CompareRecords();
|
|
|
String featuresId = a.getFeaturesId();
|
|
|
+ if(featuresId==null){
|
|
|
+ return Response.success(compareRecords);
|
|
|
+ }
|
|
|
String[] split = featuresId.split(",");
|
|
|
List<CompareRecords.CY> list=new ArrayList<>();
|
|
|
for(String str :split){
|
|
@@ -97,7 +105,11 @@ public class CompareRecordsService extends ServiceImpl<CompareRecordsMapper, Com
|
|
|
return Response.success(list2);
|
|
|
}
|
|
|
List<CompareRecords.CY> list=new ArrayList<>();
|
|
|
- String[] split = compareRecords.getFeaturesId().split(",");
|
|
|
+ String str3=compareRecords.getFeaturesId();
|
|
|
+ if(str3==null){
|
|
|
+ return Response.success(compareRecords);
|
|
|
+ }
|
|
|
+ String[] split = str3.split(",");
|
|
|
for(String str :split){
|
|
|
int i=Integer.parseInt(str);
|
|
|
Features features = featureMapper.find(i);
|