Prechádzať zdrojové kódy

移动端-巡检计划检查项查询

jichaobo 2 rokov pred
rodič
commit
fee121603e

+ 13 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanSonServiceImpl.java

@@ -409,6 +409,14 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
                     siteIdList.add(recordList.get(i).getSiteId());
                     recordIdList.add(recordList.get(i).getId());
                 }
+                List<PatrolInspectionSite> list1 = new ArrayList<>();
+                if (id != null && id != 0){
+                    LambdaQueryWrapper<PatrolInspectionSite> queryWrapper1 = Wrappers.lambdaQuery();
+                    queryWrapper1.select(PatrolInspectionSite::getId,PatrolInspectionSite::getPictureUrl)
+                            .eq(PatrolInspectionSite::getId,recordList.get(0).getSiteId());
+                    list1 = patrolInspectionSiteService.list(queryWrapper1);
+                }
+
                 LambdaQueryWrapper<PatrolInspectionRecordPicture> queryOne = Wrappers.lambdaQuery();
                 queryOne.in(PatrolInspectionRecordPicture::getRecordId, recordIdList);
                 List<PatrolInspectionRecordPicture> recordPictureList = patrolInspectionRecordPictureService.list(queryOne);
@@ -429,6 +437,11 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
                 });
                 for (int i = 0; i < recordList.size(); i++) {
                     PatrolInspectionRecordVo record = new PatrolInspectionRecordVo();
+                    for (int j = 0; j < list1.size(); j++) {
+                        if (recordList.get(i).getSiteId()==list1.get(j).getId()){
+                            record.setPictureUrl(list1.get(j).getPictureUrl());
+                        }
+                    }
                     record.setId(recordList.get(i).getId());
                     record.setSiteNubmber(recordList.get(i).getSiteNubmber());
                     record.setSiteType(recordList.get(i).getSiteType());

+ 5 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/PatrolInspectionRecordVo.java

@@ -147,4 +147,9 @@ public class PatrolInspectionRecordVo implements Serializable {
      */
     private Integer contentCount;
 
+    /**
+     * 图片地址
+     */
+    private String pictureUrl;
+
 }