Browse Source

1、收藏列表-收藏状态为空,报错空指针修复

master
Aug 6 months ago
parent
commit
2b5033b59f
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/CollectionServiceImpl.java

+ 9
- 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/CollectionServiceImpl.java View File

@ -67,10 +67,16 @@ public class CollectionServiceImpl implements CollectionService {
WorkorderTemplate template = workorderTemplateService.getById(record.getTemplateId()); WorkorderTemplate template = workorderTemplateService.getById(record.getTemplateId());
//添加工单状态说明 //添加工单状态说明
for (WorkorderStatus status : workorderStatus) { for (WorkorderStatus status : workorderStatus) {
if(template.getStatusId().equals(status.getId())){
template.setStatusDescribe(status.getName());
break;
//工单状态为空是不设置状态描述
if(null != template.getStatusId()){
if(template.getStatusId().equals(status.getId())){
template.setStatusDescribe(status.getName());
break;
}
}else {
continue;
} }
} }
record.setWorkorderTemplate(template); record.setWorkorderTemplate(template);
} }


Loading…
Cancel
Save