npe
This commit is contained in:
parent
c7c5f52b1e
commit
85931f3e0e
|
@ -8,6 +8,8 @@ import io.renren.modules.activiti.dto.ProcessActivityDTO;
|
|||
import io.renren.modules.activiti.dto.ProcessInstanceDTO;
|
||||
import io.renren.modules.activiti.service.ActHistoryService;
|
||||
import io.renren.modules.activiti.service.ActivitiService;
|
||||
import io.renren.modules.demanData.dto.TDemandDataDTO;
|
||||
import io.renren.modules.demanData.service.TDemandDataService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||
|
@ -50,6 +52,8 @@ public class HistoryController {
|
|||
private TAbilityApplicationService abilityApplicationService;
|
||||
@Autowired
|
||||
private TResourceMountApplyService tResourceMountApplyService;
|
||||
@Autowired
|
||||
private TDemandDataService tDemandDataService;
|
||||
|
||||
@GetMapping("getInstImage")
|
||||
@ApiOperation(value = "获取流程活动图", produces = "application/octet-stream")
|
||||
|
@ -125,10 +129,13 @@ public class HistoryController {
|
|||
TAbilityApplicationDTO abilityApplicationDTO =
|
||||
abilityApplicationService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
TResourceMountApplyDTO tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
if (abilityApplicationDTO != null) {
|
||||
activityDTO.setResourceName(abilityApplicationDTO.getSystem());
|
||||
} else if (tResourceMountApplyDTO != null) {
|
||||
activityDTO.setResourceName(tResourceMountApplyDTO.getResourceDTO().getName());
|
||||
} else if (tDemandDataDTO != null) {
|
||||
activityDTO.setResourceName(tDemandDataDTO.getDemandSubject());
|
||||
}
|
||||
}
|
||||
return new Result().ok(page);
|
||||
|
|
|
@ -123,12 +123,15 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
@Override
|
||||
public ResourceDTO selectWithAttrs(Long id) {
|
||||
Long userId = SecurityUser.getUser().getId();
|
||||
ResourceDTO resourceDTO = resourceDao.selectDTOById(id, userId);
|
||||
ResourceDTO resourceDTO = baseDao.selectDTOById(id, userId);
|
||||
if (resourceDTO == null) {
|
||||
return null;
|
||||
}
|
||||
QueryWrapper<AttrEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("data_resource_id", id)
|
||||
.eq("del_flag", 0);
|
||||
List<AttrEntity> attrEntities = attrDao.selectList(wrapper);
|
||||
resourceDTO.setInfoList(attrEntities);
|
||||
resourceDTO.setInfoList(attrEntities == null ? new ArrayList<>() : attrEntities); // npe?
|
||||
return resourceDTO;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue