Browse Source

查询问题数据为空添加校验判断

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
ae558becb4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 3
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java View File

@@ -345,6 +345,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
InspectionFile inspectionFile = inspectionFileMapper.selectById(inspectionFiledId);
inspectionFileList.add(inspectionFile);
}
if(CollectionUtil.isEmpty(inspectionFileList) || inspectionFileList.size() == 0){
throw new ServiceException("问题数据查询为空");
}
log.info("问题列表为:inspectionFileList={}",inspectionFileList.toString());
//待处理问题总数
long count = inspectionFileList.stream().filter(t -> t.getStatus() == 20).count();

Loading…
Cancel
Save