|
@@ -1,8 +1,10 @@
|
|
package com.usky.fire.service.impl;
|
|
package com.usky.fire.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.usky.common.core.exception.BusinessException;
|
|
import com.usky.common.core.exception.BusinessException;
|
|
|
|
+import com.usky.common.core.util.StringUtils;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
import com.usky.fire.domain.*;
|
|
import com.usky.fire.domain.*;
|
|
@@ -181,7 +183,7 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
|
|
if (siteId != 0 && siteId != null) {
|
|
if (siteId != 0 && siteId != null) {
|
|
queryWrapper.eq(PatrolInspectionSite::getId, siteId);
|
|
queryWrapper.eq(PatrolInspectionSite::getId, siteId);
|
|
}
|
|
}
|
|
- if (siteNubmber != null && !"".equals(siteNubmber)) {
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(siteNubmber)) {
|
|
queryWrapper.eq(PatrolInspectionSite::getSiteNubmber, siteNubmber);
|
|
queryWrapper.eq(PatrolInspectionSite::getSiteNubmber, siteNubmber);
|
|
}
|
|
}
|
|
List<PatrolInspectionSite> siteList = patrolInspectionSiteService.list(queryWrapper);
|
|
List<PatrolInspectionSite> siteList = patrolInspectionSiteService.list(queryWrapper);
|
|
@@ -194,10 +196,12 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
|
|
query.eq(PatrolInspectionRecord::getSiteId, siteId)
|
|
query.eq(PatrolInspectionRecord::getSiteId, siteId)
|
|
.eq(PatrolInspectionRecord::getPlanSonId, planSonId);
|
|
.eq(PatrolInspectionRecord::getPlanSonId, planSonId);
|
|
List<PatrolInspectionRecord> recordList = patrolInspectionRecordMapper.selectList(query);
|
|
List<PatrolInspectionRecord> recordList = patrolInspectionRecordMapper.selectList(query);
|
|
- siteList.get(0).setRemarks(recordList.get(0).getRemarks());
|
|
|
|
- LambdaQueryWrapper<PatrolInspectionRecordPicture> queryOne = Wrappers.lambdaQuery();
|
|
|
|
- queryOne.eq(PatrolInspectionRecordPicture::getRecordId, recordList.get(0).getId());
|
|
|
|
- recordPictureList = patrolInspectionRecordPictureService.list(queryOne);
|
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(recordList)){
|
|
|
|
+ siteList.get(0).setRemarks(recordList.get(0).getRemarks());
|
|
|
|
+ LambdaQueryWrapper<PatrolInspectionRecordPicture> queryOne = Wrappers.lambdaQuery();
|
|
|
|
+ queryOne.eq(PatrolInspectionRecordPicture::getRecordId, recordList.get(0).getId());
|
|
|
|
+ recordPictureList = patrolInspectionRecordPictureService.list(queryOne);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
siteList.get(0).setRecordPictureList(recordPictureList);
|
|
siteList.get(0).setRecordPictureList(recordPictureList);
|