|
|
@@ -2,20 +2,43 @@ package cn.cslg.pas.service.quartzService;
|
|
|
|
|
|
import cn.cslg.pas.common.core.base.Cycle;
|
|
|
import cn.cslg.pas.common.dto.PatentColumnDTO;
|
|
|
+import cn.cslg.pas.common.dto.PatentDTO;
|
|
|
+import cn.cslg.pas.common.dto.es.EsCustomFieldDTO;
|
|
|
+import cn.cslg.pas.common.model.project.monitorPatent.MonitorPatentErrorVO;
|
|
|
+import cn.cslg.pas.common.model.project.monitorPatent.MonitorPatentResultVO;
|
|
|
+import cn.cslg.pas.common.model.request.StringRequest;
|
|
|
+import cn.cslg.pas.common.utils.DataUtils;
|
|
|
+import cn.cslg.pas.common.utils.DateUtils;
|
|
|
import cn.cslg.pas.common.utils.DateUtils2;
|
|
|
import cn.cslg.pas.common.utils.StringUtils;
|
|
|
import cn.cslg.pas.common.utils.utilVO.CheckDateConditionVO;
|
|
|
+import cn.cslg.pas.common.vo.*;
|
|
|
import cn.cslg.pas.common.vo.business.PatentNoVO;
|
|
|
import cn.cslg.pas.domain.business.ImportTaskCondition;
|
|
|
import cn.cslg.pas.domain.business.PatentProject;
|
|
|
+import cn.cslg.pas.domain.business.SystemDict;
|
|
|
+import cn.cslg.pas.domain.es.LegalEvent;
|
|
|
import cn.cslg.pas.domain.es.Patent;
|
|
|
import cn.cslg.pas.domain.project.PatentStatusMonitor;
|
|
|
+import cn.cslg.pas.domain.project.PatentStatusMonitorRecord;
|
|
|
+import cn.cslg.pas.exception.ExceptionEnum;
|
|
|
+import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.service.MailSendService;
|
|
|
-import cn.cslg.pas.service.business.ImportTaskConditionService;
|
|
|
-import cn.cslg.pas.service.business.ImportTaskService;
|
|
|
-import cn.cslg.pas.service.business.PatentProjectService;
|
|
|
+import cn.cslg.pas.service.business.*;
|
|
|
+import cn.cslg.pas.service.business.es.EsCustomFieldService;
|
|
|
+import cn.cslg.pas.service.business.es.EsLegalEventService;
|
|
|
import cn.cslg.pas.service.business.es.EsPatentService;
|
|
|
+import cn.cslg.pas.service.business.es.EsService;
|
|
|
+import cn.cslg.pas.service.common.PatentStarApiService;
|
|
|
+import cn.cslg.pas.service.importPatent.ImportSinglePatentService;
|
|
|
+import cn.cslg.pas.service.importPatent.WebVOTransformService;
|
|
|
+import cn.cslg.pas.service.project.PatentStatusMonitorRecordService;
|
|
|
import cn.cslg.pas.service.project.PatentStatusMonitorService;
|
|
|
+import cn.cslg.pas.service.project.PatentStatusUpdateRecord;
|
|
|
+import cn.cslg.pas.service.project.PatentStatusUpdateRecordService;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.quartz.DisallowConcurrentExecution;
|
|
|
@@ -23,11 +46,12 @@ import org.quartz.JobExecutionContext;
|
|
|
import org.quartz.JobExecutionException;
|
|
|
import org.springframework.scheduling.quartz.QuartzJobBean;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.ZoneId;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@@ -38,6 +62,16 @@ public class SysImportPatentStatusJobService extends QuartzJobBean {
|
|
|
private final MailSendService mailSendService;
|
|
|
private final PatentStatusMonitorService patentStatusMonitorService;
|
|
|
private final EsPatentService esPatentService;
|
|
|
+ private final PatentStarApiService patentStarApiService;
|
|
|
+ private final EsService esService;
|
|
|
+ private final ImportSinglePatentService importSinglePatentService;
|
|
|
+ private final EsLegalEventService esLegalEventService;
|
|
|
+ private final WebVOTransformService webVOTransformService;
|
|
|
+ private final CustomFieldService customFieldService;
|
|
|
+ private final EsCustomFieldService esCustomFieldService;
|
|
|
+ private final SystemDictService systemDictService;
|
|
|
+ private final PatentStatusUpdateRecordService patentStatusUpdateRecordService;
|
|
|
+ private final PatentStatusMonitorRecordService patentStatusMonitorRecordService;
|
|
|
|
|
|
@Override
|
|
|
public void executeInternal(JobExecutionContext context) throws JobExecutionException {
|
|
|
@@ -49,65 +83,286 @@ public class SysImportPatentStatusJobService extends QuartzJobBean {
|
|
|
|
|
|
|
|
|
public void monitorPatentStatus() {
|
|
|
+ LocalDate currentDate = LocalDate.now();
|
|
|
+ Date date = Date.from(currentDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
+
|
|
|
List<PatentStatusMonitor> patentStatusMonitors = patentStatusMonitorService.getAllRunning();
|
|
|
for (PatentStatusMonitor patentStatusMonitor : patentStatusMonitors) {
|
|
|
- List<String> successNos = new ArrayList<>();
|
|
|
- List<Map<String, Object>> errorNos = new ArrayList<>();
|
|
|
+ Integer id = patentStatusMonitor.getId();
|
|
|
Integer type = patentStatusMonitor.getType();
|
|
|
+ String target = patentStatusMonitor.getTargetSss();
|
|
|
+ Integer projectId = patentStatusMonitor.getProjectId();
|
|
|
+ String searchQuery = patentStatusMonitor.getSearchQuery();
|
|
|
+ List<String> targetSSIds = StringUtils.changeStringToString(target, ",");
|
|
|
+ List<String> targetSS = this.getTargetSS(targetSSIds);
|
|
|
+ PatentStatusMonitorRecord patentStatusMonitorRecord = patentStatusMonitorRecordService.add(projectId, id, date);
|
|
|
if (type == 0) {
|
|
|
String patentNosStr = patentStatusMonitor.getPatentList();
|
|
|
List<String> patentNosList = StringUtils.changeStringToString(patentNosStr, ",");
|
|
|
for (String patentNo : patentNosList) {
|
|
|
+ this.updatePatentStatus(patentNo, projectId, targetSS, date, patentStatusMonitorRecord);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ StringRequest stringRequest = JSONObject.parseObject(searchQuery, StringRequest.class);
|
|
|
+ Long current = 1l;
|
|
|
+ stringRequest.setSize(50l);
|
|
|
+ stringRequest.setCurrent(current);
|
|
|
|
|
|
+ PatentDTO patentDTO = esService.esSearch2(stringRequest);
|
|
|
+ Long total = patentDTO.getTotal();
|
|
|
+ Long allSize = total / 50l;
|
|
|
+ if (total % 50l != 0) {
|
|
|
+ allSize += 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (long i = 0; i < allSize; i++) {
|
|
|
+ stringRequest.setCurrent(i + 1l);
|
|
|
+ PatentDTO patentDTO2 = esService.esSearch2(stringRequest);
|
|
|
+ List<Patent> patents = patentDTO2.getOrgPatents();
|
|
|
+ for (Patent patent : patents) {
|
|
|
+ String patentNo = patent.getPatentNo();
|
|
|
+ this.updatePatentStatus(patentNo, projectId, targetSS, date, patentStatusMonitorRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
+ patentStatusMonitorRecord.setStatus(1);
|
|
|
+ patentStatusMonitorRecord.updateById();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void addErrorMessage(String patentNos, String message, List<Map<String, Object>> errorNos) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("patentNo", patentNos);
|
|
|
- map.put("message", message);
|
|
|
- errorNos.add(map);
|
|
|
+ public String updatePatentStatus(String patentNo, Integer projectId, List<String> targetSs, Date nowDate, PatentStatusMonitorRecord patentStatusMonitorRecord) {
|
|
|
+ Integer id = patentStatusMonitorRecord.getId();
|
|
|
+ try {
|
|
|
+ PatentWithIdVO patentWithIdVO = esService.getIdByPatentNo(patentNo);
|
|
|
+ if (patentWithIdVO == null) {
|
|
|
+
|
|
|
+ patentStatusMonitorRecordService.UpdateErrorPatentMessage(patentStatusMonitorRecord, patentNo, "专题库");
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ Patent patent = patentWithIdVO.getPatent();
|
|
|
+
|
|
|
+
|
|
|
+ String appNo = patent.getAppNo();
|
|
|
+ if (appNo == null) {
|
|
|
+ patentStatusMonitorRecordService.UpdateErrorPatentMessage(patentStatusMonitorRecord, patentNo, "没有申请号");
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ if (!appNo.startsWith("CN")) {
|
|
|
+ patentStatusMonitorRecordService.UpdateErrorPatentMessage(patentStatusMonitorRecord, patentNo, "非中国专利");
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ChinaLeagalStatus> chinaLeagalStatuses = new ArrayList<>();
|
|
|
+ List<LegalEvent> events = new ArrayList<>();
|
|
|
+ PatentStatusUpdateRecord patentStatusUpdateRecord = patentStatusUpdateRecordService.getByPatentNo(patentNo, nowDate);
|
|
|
+ if (patentStatusUpdateRecord != null) {
|
|
|
+ String orgStatus = patentStatusUpdateRecord.getOrgStatus();
|
|
|
+ String nowStatus = patentStatusUpdateRecord.getNowStatus();
|
|
|
+ events = JSONArray.parseArray(orgStatus, LegalEvent.class);
|
|
|
+ chinaLeagalStatuses = JSONArray.parseArray(nowStatus, ChinaLeagalStatus.class);
|
|
|
+ } else {
|
|
|
+ String rowAppNo = appNo.substring(2, appNo.length() - 2);
|
|
|
+ events = esPatentService.getLegalEvents(patentNo);
|
|
|
+ chinaLeagalStatuses = patentStarApiService.getCNEvents(rowAppNo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (chinaLeagalStatuses.size() == 0) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ //作差查看是否有更新的
|
|
|
+ List<ChinaLeagalStatus> updateLeagals = getUpdateLeagals(chinaLeagalStatuses, events);
|
|
|
+ //如果有,更新法律状态以及专利信息
|
|
|
+ if (updateLeagals.size() > 0) {
|
|
|
+ updateLeagals = updateLeagals.stream().sorted(Comparator.comparing(ChinaLeagalStatus::getLegalDate)).collect(Collectors.toList());
|
|
|
+ //专利更新
|
|
|
+ if (patentStatusUpdateRecord == null) {
|
|
|
+ patentStatusUpdateRecordService.add(id, patentNo, nowDate, events, chinaLeagalStatuses);
|
|
|
+ this.updatePatent(updateLeagals, patentWithIdVO, new ArrayList<String>());
|
|
|
+ }
|
|
|
+ List<MonitorPatentResultVO> monitorPatentResultVOS = this.getMonitorResult(events, updateLeagals, targetSs);
|
|
|
+ if (monitorPatentResultVOS != null && monitorPatentResultVOS.size() > 0) {
|
|
|
+ List<EsCustomFieldDTO> esCustomFieldDTOList = this.getEsCustomFieldDTOList(projectId, monitorPatentResultVOS);
|
|
|
+ this.addPatentCustomFiled(esCustomFieldDTOList, patentWithIdVO);
|
|
|
+ patentStatusMonitorRecordService.updateSuccessPatentMessage(patentStatusMonitorRecord, patentNo, events, monitorPatentResultVOS);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ patentStatusMonitorRecordService.UpdateErrorPatentMessage(patentStatusMonitorRecord, patentNo, "专利数据入库错误");
|
|
|
+
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
}
|
|
|
|
|
|
- public void updatePatentStatus(String patentNo, List<String> successNos, List<Map<String, Object>> errorNos) {
|
|
|
- PatentNoVO patentNoVO = new PatentNoVO();
|
|
|
- patentNoVO.setPatentNo(patentNo);
|
|
|
- try {
|
|
|
- PatentColumnDTO patentColumnDTO = esPatentService.selectPatentDetail(patentNoVO);
|
|
|
- if (patentColumnDTO == null) {
|
|
|
- return;
|
|
|
+ public List<ChinaLeagalStatus> getUpdateLeagals(List<ChinaLeagalStatus> chinaLeagalStatuses, List<LegalEvent> events) {
|
|
|
+ if (events == null || events.size() == 0) {
|
|
|
+ return chinaLeagalStatuses;
|
|
|
+ }
|
|
|
+ List<ChinaLeagalStatus> updateLeagalStatus = new ArrayList<>();
|
|
|
+ for (ChinaLeagalStatus chinaLeagalStatus : chinaLeagalStatuses) {
|
|
|
+ String code = chinaLeagalStatus.getLegalCode();
|
|
|
+ LegalEvent legalEvent = events.stream().filter(item -> item.getCode().equals(code)).findFirst().orElse(null);
|
|
|
+ if (legalEvent == null) {
|
|
|
+ updateLeagalStatus.add(chinaLeagalStatus);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return updateLeagalStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void updatePatent(List<ChinaLeagalStatus> updateLeagals, PatentWithIdVO patentWithIdVO, List<String> targetSS) {
|
|
|
+ Patent oldPatent = patentWithIdVO.getPatent();
|
|
|
+ String oldPatentNo = oldPatent.getPatentNo();
|
|
|
+ StarPatentVO starPatentVO = importSinglePatentService.getPatentFromWeb(oldPatentNo);
|
|
|
+ if (starPatentVO == null) {
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "未检索到专利");
|
|
|
+ }
|
|
|
+
|
|
|
+ Patent patent = new Patent();
|
|
|
+ //装载基本信息
|
|
|
+ patent.setPatentNo(oldPatent.getPatentNo());
|
|
|
+ patent = importSinglePatentService.getPatentCataloguingFromWeb(starPatentVO);
|
|
|
+
|
|
|
+
|
|
|
+ List<LegalEvent> legalEvents = new ArrayList<>();
|
|
|
+ for (ChinaLeagalStatus item : updateLeagals) {
|
|
|
+ LegalEvent legalEvent1 = new LegalEvent();
|
|
|
+ legalEvent1.setEventDate(item.getLegalDate());
|
|
|
+ legalEvent1.setCode(item.getLegalCode());
|
|
|
+ legalEvent1.setAppNo(patent.getAppNo());
|
|
|
+ legalEvent1.setGrantNo(patent.getGrantNo());
|
|
|
+ legalEvent1.setPublicNo(patent.getPublicNo());
|
|
|
+ legalEvent1.setDescription(item.getLegalStatusInfo());
|
|
|
+ legalEvent1.setName(item.getLegalStatus());
|
|
|
+ legalEvents.add(legalEvent1);
|
|
|
+ try {
|
|
|
+ String reId = esLegalEventService.addLegalEvent(legalEvent1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
|
}
|
|
|
+ }
|
|
|
+ webVOTransformService.transLegalEvent(patent, legalEvents);
|
|
|
+ try {
|
|
|
+ importSinglePatentService.getPDFFromWeb(starPatentVO);
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(patent)) {
|
|
|
+ esService.updatePatentShouldWait(patent, patentWithIdVO.getId());
|
|
|
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- //获取专利的法律状态
|
|
|
- //获取专利最新的法律状态
|
|
|
- //对比
|
|
|
- //若有变化,对专利进行更新
|
|
|
+ public List<EsCustomFieldDTO> getEsCustomFieldDTOList(Integer projectId, List<MonitorPatentResultVO> monitorPatentResultVOS) {
|
|
|
+ UploadParamsVO.Field field = new UploadParamsVO.Field();
|
|
|
+ field.setKey("专利法律状态监控:6");
|
|
|
+ List<String> fieldValues = new ArrayList<>();
|
|
|
+ for (MonitorPatentResultVO monitorPatentResultVO : monitorPatentResultVOS) {
|
|
|
+ ChinaLeagalStatus legalEvent = monitorPatentResultVO.getLastStatus();
|
|
|
+ String dateName = DateUtils.dateTimeToStr(legalEvent.getLegalDate(), "yyyy-MM-dd");
|
|
|
+ String message = legalEvent.getSimpleStatus();
|
|
|
+ String fieldValue = message + "\\" + dateName;
|
|
|
+ fieldValues.add(fieldValue);
|
|
|
+ }
|
|
|
+ field.setFieldList(fieldValues);
|
|
|
+ List<EsCustomFieldDTO> esCustomFieldDTOList = customFieldService.getFieldDTOByStrings(Arrays.asList(field), projectId, null);
|
|
|
+ return esCustomFieldDTOList;
|
|
|
}
|
|
|
|
|
|
- public List<String> getCnCycles() {
|
|
|
- CheckDateConditionVO checkDateConditionVO = DateUtils2.checkDateCycleCondition(null);
|
|
|
- Boolean ifMeetMonth = checkDateConditionVO.getIfMeetMonth();
|
|
|
- Boolean ifMeetQuarter = checkDateConditionVO.getIfMeetQuarter();
|
|
|
- Boolean ifMeetYear = checkDateConditionVO.getIfMeetYear();
|
|
|
- List<String> cycles = new ArrayList<>();
|
|
|
- cycles.add(Cycle.WEEK);
|
|
|
+ public void addPatentCustomFiled(List<EsCustomFieldDTO> esCustomFieldDTOS, PatentWithIdVO patentWithIdVO) {
|
|
|
+ String patentId = patentWithIdVO.getId();
|
|
|
+ Patent patent = patentWithIdVO.getPatent();
|
|
|
+ if (esCustomFieldDTOS != null && esCustomFieldDTOS.size() > 0) {
|
|
|
+ for (EsCustomFieldDTO esCustomFieldDTO : esCustomFieldDTOS
|
|
|
+ ) {
|
|
|
+ esCustomFieldDTO.setPatentId(patentId);
|
|
|
+ if (esCustomFieldDTO.getOptionType() == null) {
|
|
|
+ esCustomFieldDTO.setOptionType(1);
|
|
|
+ }
|
|
|
+ esCustomFieldDTO.setOptionType(esCustomFieldDTO.getOptionType());
|
|
|
+ esCustomFieldDTO.setPatentNo(patent.getPatentNo());
|
|
|
+ try {
|
|
|
+ esCustomFieldService.addCustomField(esCustomFieldDTO);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- if (ifMeetMonth != null && ifMeetMonth) {
|
|
|
- cycles.add(Cycle.MONTH);
|
|
|
}
|
|
|
- if (ifMeetQuarter != null && ifMeetQuarter) {
|
|
|
- cycles.add(Cycle.QUARTER);
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<String> getTargetSS(List<String> targetIds) {
|
|
|
+ if (targetIds == null || targetIds.size() == 0) {
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
- if (ifMeetYear != null && ifMeetYear) {
|
|
|
- cycles.add(Cycle.YEAR);
|
|
|
+ List<SystemDict> systemDictList = systemDictService.getSystemDictByTypeAndValue("PATENT_MONITOR_STATUS", targetIds);
|
|
|
+ List<String> targetss = systemDictList.stream().map(SystemDict::getLabel).collect(Collectors.toList());
|
|
|
+ return targetss;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<MonitorPatentResultVO> getMonitorResult(List<LegalEvent> legalEvents, List<ChinaLeagalStatus> chinaLeagalStatuses, List<String> targetSSs) {
|
|
|
+ List<MonitorPatentResultVO> monitorPatentResultVOS = new ArrayList<>();
|
|
|
+ //获取法律状态字典
|
|
|
+ List<SystemDict> systemDictList = systemDictService.getSystemDictByTypeAndSimpleLabel("PATENT_STATUS2", targetSSs);
|
|
|
+ //装载更新后的法律状态的简单法律状态
|
|
|
+ this.getSimpleStatus(chinaLeagalStatuses, systemDictList);
|
|
|
+ //
|
|
|
+ String simpleOrgStatus = "";
|
|
|
+ LegalEvent legalEvent = null;
|
|
|
+ if (legalEvents != null && legalEvents.size() > 0) {
|
|
|
+ legalEvents = legalEvents.stream().sorted(Comparator.comparing(LegalEvent::getEventDate).reversed()).collect(Collectors.toList());
|
|
|
+ List<SystemDict> systemDictAll = systemDictService.getSystemDictByTypeAndValue("PATENT_STATUS2", null);
|
|
|
+ for (LegalEvent legalEvent1 : legalEvents) {
|
|
|
+ String orgStatus = legalEvent1.getDescription();
|
|
|
+ SystemDict systemDict = systemDictAll.stream().filter(item -> item.getRemark().equals(orgStatus)).findFirst().orElse(null);
|
|
|
+ if (systemDict != null && !StringUtils.isEmpty(systemDict.getSimpleLabel())) {
|
|
|
+ simpleOrgStatus = systemDict.getSimpleLabel();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ for (String tagetSs : targetSSs) {
|
|
|
+ //获取更新后的法律状态
|
|
|
+ ChinaLeagalStatus chinaLeagalStatus = chinaLeagalStatuses.stream().filter(item -> item.getSimpleStatus() != null && item.getSimpleStatus().equals(tagetSs)).findFirst().orElse(null);
|
|
|
+ //获取当前法律状态的状态
|
|
|
+ if (chinaLeagalStatus == null) {
|
|
|
+ return monitorPatentResultVOS;
|
|
|
+ }
|
|
|
+ if (chinaLeagalStatus.getSimpleStatus().equals(simpleOrgStatus)) {
|
|
|
+ return monitorPatentResultVOS;
|
|
|
+ }
|
|
|
+ MonitorPatentResultVO monitorPatentResultVO = new MonitorPatentResultVO();
|
|
|
+ monitorPatentResultVO.setSimpleOrgStatus(simpleOrgStatus);
|
|
|
+ monitorPatentResultVO.setOrgStatus(legalEvent);
|
|
|
+ monitorPatentResultVO.setLastStatus(chinaLeagalStatus);
|
|
|
+ monitorPatentResultVOS.add(monitorPatentResultVO);
|
|
|
}
|
|
|
- return cycles;
|
|
|
+ return monitorPatentResultVOS;
|
|
|
+ }
|
|
|
|
|
|
+ public String getSimpleStatus(String remark, List<SystemDict> systemDictList) {
|
|
|
+ SystemDict systemDict = systemDictList.stream().filter(item -> item.getRemark().equals(remark)).findFirst().orElse(null);
|
|
|
+ if (systemDict != null) {
|
|
|
+ return systemDict.getSimpleLabel();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void getSimpleStatus(List<ChinaLeagalStatus> chinaLeagalStatuses, List<SystemDict> systemDictList) {
|
|
|
+ for (ChinaLeagalStatus chinaLeagalStatus : chinaLeagalStatuses) {
|
|
|
+ SystemDict systemDict = systemDictList.stream().filter(item -> item.getRemark().equals(chinaLeagalStatus.getLegalStatusInfo())).findFirst().orElse(null);
|
|
|
+ if (systemDict != null) {
|
|
|
+ chinaLeagalStatus.setSimpleStatus(systemDict.getSimpleLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|