|
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import lombok.val;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -28,6 +29,7 @@ import java.util.stream.Collectors;
|
|
@Slf4j
|
|
@Slf4j
|
|
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
public class CompareFilesService extends ServiceImpl<CompareFilesMapper, CompareFiles> {
|
|
public class CompareFilesService extends ServiceImpl<CompareFilesMapper, CompareFiles> {
|
|
|
|
+ private final CompareFilesMapper compareFilesMapper;
|
|
private final OutInterfaceService outInterfaceService;
|
|
private final OutInterfaceService outInterfaceService;
|
|
// public String addCompareFile(CompareFilesVO compareFilesVO){
|
|
// public String addCompareFile(CompareFilesVO compareFilesVO){
|
|
// List<CompareFiles> compareFiles =new ArrayList<>();
|
|
// List<CompareFiles> compareFiles =new ArrayList<>();
|
|
@@ -51,8 +53,7 @@ public class CompareFilesService extends ServiceImpl<CompareFilesMapper, Compare
|
|
patentVO.setStartNumber(compareFilesVO.getStartNumber()-1);
|
|
patentVO.setStartNumber(compareFilesVO.getStartNumber()-1);
|
|
patentVO.setEndNumber(compareFilesVO.getEndNumber());
|
|
patentVO.setEndNumber(compareFilesVO.getEndNumber());
|
|
patentVO.setReportId(compareFilesVO.getReportId());
|
|
patentVO.setReportId(compareFilesVO.getReportId());
|
|
- patentVO.setPatentNos(patentNoList);
|
|
|
|
- String res = outInterfaceService.getComPatentNos(patentVO);
|
|
|
|
|
|
+ patentVO.setPatentNos(patentNoList);String res = outInterfaceService.getComPatentNos(patentVO);
|
|
JSONObject jsonObject =JSONObject.parseObject(res);
|
|
JSONObject jsonObject =JSONObject.parseObject(res);
|
|
List<String> patentNos =JSONArray.parseArray(jsonObject.get("data").toString(),String.class);
|
|
List<String> patentNos =JSONArray.parseArray(jsonObject.get("data").toString(),String.class);
|
|
patentNos.removeAll(compareFilesVO.getIsDelete());
|
|
patentNos.removeAll(compareFilesVO.getIsDelete());
|
|
@@ -77,7 +78,7 @@ public class CompareFilesService extends ServiceImpl<CompareFilesMapper, Compare
|
|
patentVO.setPatentNos(patentNos);
|
|
patentVO.setPatentNos(patentNos);
|
|
String res =outInterfaceService.getPatentFromPAS(patentVO,0);
|
|
String res =outInterfaceService.getPatentFromPAS(patentVO,0);
|
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
|
JSONObject jsonObject = JSONObject.parseObject(res);
|
|
- JSONObject resData = JSONObject.parseObject(jsonObject.getString("data"));
|
|
|
|
|
|
+ JSONObject resData = JSONObject.parseObject(jsonObject.getString("data"));
|
|
List<JSONObject> list= JSONArray.parseArray(resData.getString("records"),JSONObject.class);
|
|
List<JSONObject> list= JSONArray.parseArray(resData.getString("records"),JSONObject.class);
|
|
List<String> temNos =new ArrayList<>();
|
|
List<String> temNos =new ArrayList<>();
|
|
for(int i=0;i<list.size(); i++){
|
|
for(int i=0;i<list.size(); i++){
|
|
@@ -85,9 +86,11 @@ public class CompareFilesService extends ServiceImpl<CompareFilesMapper, Compare
|
|
temNos.add(list.get(i).get("patentNo").toString());}
|
|
temNos.add(list.get(i).get("patentNo").toString());}
|
|
|
|
|
|
}
|
|
}
|
|
- Map<String,Object> map =new HashMap<>();
|
|
|
|
- map.put("datas",resData);
|
|
|
|
|
|
+ int i = compareFilesMapper.selectedTotal(patentVO.getReportId());
|
|
|
|
+ Map<String,Object> map =new HashMap<>();
|
|
|
|
+ map.put("datas",resData);
|
|
map.put("select",temNos);
|
|
map.put("select",temNos);
|
|
|
|
+ map.put("selectedTotal",i);
|
|
return Response.success(map) ;
|
|
return Response.success(map) ;
|
|
}
|
|
}
|
|
|
|
|