|
@@ -1331,19 +1331,29 @@ public String getComPantentNos(PatentVO params){
|
|
|
if(location>totalNumber){
|
|
|
location=totalNumber;
|
|
|
}
|
|
|
- int n=location-2;
|
|
|
- if(n<0){
|
|
|
- n=0;
|
|
|
+ int p;
|
|
|
+ int n;
|
|
|
+ if(location==1){
|
|
|
+ p=2;
|
|
|
+ n=0;}
|
|
|
+ else {
|
|
|
+ p=3;
|
|
|
+ n=location-2;
|
|
|
}
|
|
|
- int p=3;
|
|
|
+
|
|
|
List<Patent> patent = patentMapper.getPatent(list, n, p);
|
|
|
+ String str1= patent.get(0).getPatentNo();
|
|
|
+ String str2=patent.get(1).getPatentNo();
|
|
|
+ String str3=patent.get(2).getPatentNo();
|
|
|
int front=location-1;
|
|
|
int behind=totalNumber-location;
|
|
|
Map map=new HashMap();
|
|
|
map.put("frontNumber",front);
|
|
|
map.put("behindNumber",behind);
|
|
|
map.put("totalNumber",totalNumber);
|
|
|
- map.put("Patent",patent);
|
|
|
+ map.put("frontPatent",str1);
|
|
|
+ map.put("currentPatent",str2);
|
|
|
+ map.put("behindPatent",str3);
|
|
|
return Response.success(map);
|
|
|
|
|
|
|