Browse Source

变量导出3

jichaobo 3 years ago
parent
commit
3b94ae14b1

+ 3 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/DeviceAnalogVariableListServiceImpl.java

@@ -131,6 +131,9 @@ public class DeviceAnalogVariableListServiceImpl extends AbstractCrudService<Dev
                     (o, i) -> {
                         Page<DeviceAnalogVariableListOneVo> page = new Page<>(i, 30);
                         page = baseMapper.variableListExport(page,siteId, variableName, dataArea);
+                        if (page.getRecords().isEmpty()){
+                            throw new BusinessException("表格数据为空");
+                        }
                         return new ArrayList<>(BeanMapperUtils.mapList(page.getRecords(), DeviceAnalogVariableListOneVo.class, DeviceAnalogVariableListExportVO.class));
                     }, null);
             if (null != workbook) {