|
@@ -43,7 +43,13 @@ public class DemReportInfoServiceImpl extends AbstractCrudService<DemReportInfoM
|
|
|
public CommonPage<DemReportInfo> reportInfoList(String companyId, String sourceType, Integer pageNum, Integer pageSize) {
|
|
|
IPage<DemReportInfo> page = new Page<>(pageNum, pageSize);
|
|
|
|
|
|
- String organization = SecurityUtils.getLoginUser().getSysUser().getRemark();
|
|
|
+ String organization = null;
|
|
|
+ try {
|
|
|
+ organization = SecurityUtils.getLoginUser().getSysUser().getRemark();
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("获取remake失败", e);
|
|
|
+ return ToCommonPage(page);
|
|
|
+ }
|
|
|
|
|
|
if (StringUtils.isBlank(organization)) {
|
|
|
throw new BusinessException("当前登录账号非消防重点单位,请联系管理员!");
|
|
@@ -52,7 +58,12 @@ public class DemReportInfoServiceImpl extends AbstractCrudService<DemReportInfoM
|
|
|
LambdaQueryWrapper<BaseCompany> queryWrapper3 = Wrappers.lambdaQuery();
|
|
|
queryWrapper3.select(BaseCompany::getCompanyId)
|
|
|
.eq(BaseCompany::getOrganization, organization);
|
|
|
- String companyId1 = baseCompanyMapper.selectOne(queryWrapper3).getCompanyId();
|
|
|
+ String companyId1 = null;
|
|
|
+ try {
|
|
|
+ companyId1 = baseCompanyMapper.selectOne(queryWrapper3).getCompanyId();
|
|
|
+ } catch (Exception e) {
|
|
|
+ return ToCommonPage(page);
|
|
|
+ }
|
|
|
|
|
|
if (StringUtils.isBlank(companyId)) {
|
|
|
companyId = companyId1;
|
|
@@ -67,9 +78,7 @@ public class DemReportInfoServiceImpl extends AbstractCrudService<DemReportInfoM
|
|
|
queryWrapper.orderByDesc(DemReportInfo::getId);
|
|
|
}
|
|
|
page = this.page(page, queryWrapper);
|
|
|
- if (page.getRecords().isEmpty()) {
|
|
|
- throw new BusinessException("当前单位暂未生成消防报告,请联系管理员!");
|
|
|
- }
|
|
|
+
|
|
|
return ToCommonPage(page);
|
|
|
}
|
|
|
|