|
@@ -48,20 +48,26 @@ public class PatentAffairService extends ServiceImpl<PatentAffairMapper, PatentA
|
|
|
List<PatentAffair> dataList = this.list(queryWrapper);
|
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.PATENT_STATUS, Constants.PATENT_SIMPLE_STATUS));
|
|
|
dataList.forEach(item -> {
|
|
|
- List<KeyValueVO> lst = JsonUtils.jsonToList(item.getContent(), KeyValueVO.class);
|
|
|
- KeyValueVO flag;
|
|
|
- for (int i = 0; i < Objects.requireNonNull(lst).size() - 1; i++) {
|
|
|
- for (int j = 0; j < lst.size() - i - 1; j++) {
|
|
|
- if (DateUtils.strToDate(lst.get(j).getInpadocData().get(0).getContent()).compareTo(DateUtils.strToDate(lst.get(j + 1).getInpadocData().get(0).getContent())) < 0) {
|
|
|
- flag = lst.get(j);
|
|
|
- lst.set(j, lst.get(j + 1));
|
|
|
- lst.set(j + 1, flag);
|
|
|
+ if (item.getContent() != null) {
|
|
|
+ List<KeyValueVO> lst = JsonUtils.jsonToList(item.getContent(), KeyValueVO.class);
|
|
|
+ KeyValueVO flag;
|
|
|
+ for (int i = 0; i < Objects.requireNonNull(lst).size() - 1; i++) {
|
|
|
+ for (int j = 0; j < lst.size() - i - 1; j++) {
|
|
|
+ if (DateUtils.strToDate(lst.get(j).getInpadocData().get(0).getContent()).compareTo(DateUtils.strToDate(lst.get(j + 1).getInpadocData().get(0).getContent())) < 0) {
|
|
|
+ flag = lst.get(j);
|
|
|
+ lst.set(j, lst.get(j + 1));
|
|
|
+ lst.set(j + 1, flag);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ item.setInpadoc(lst);
|
|
|
}
|
|
|
- item.setInpadoc(lst);
|
|
|
+ Patent patent = patentService.getById(item.getPatentId());
|
|
|
+
|
|
|
item.setCreateTime(DateUtils.formatDate(item.getDateTime(), DateUtils.YYYY_MM_DD));
|
|
|
- item.setCreateSimpleStatus(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getValue().equals(String.valueOf(item.getSimpleStatus()))).findFirst().orElse(new SystemDict()).getLabel());
|
|
|
+ if (patent != null) {
|
|
|
+ item.setCreateSimpleStatus(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_SIMPLE_STATUS) && systemDict.getValue().equals(String.valueOf(patent.getSimpleStatus()))).findFirst().orElse(new SystemDict()).getLabel());
|
|
|
+ }
|
|
|
item.setCreateStatus(systemDictList.stream().filter(systemDict -> systemDict.getType().equals(Constants.PATENT_STATUS) && systemDict.getValue().equals(String.valueOf(item.getStatus()))).findFirst().orElse(new SystemDict()).getLabel());
|
|
|
});
|
|
|
|