Browse Source

手机端-巡检自检-巡检计划-扫码查询计划

jichaobo 2 years ago
parent
commit
53617d9ce5

+ 6 - 5
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanSonServiceImpl.java

@@ -116,11 +116,12 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
             for (int i = 0; i < planScheduleList.size(); i++) {
                 planIdList.add(planScheduleList.get(i).getPlanId());
             }
-//            formatter.format(new Date());
-            List<PatrolInspectionPlanSonVo> planSonList = this.patrolInspectionPlanSon(planIdList, "2022-09-01", "DESC");
+//            ;
+            List<PatrolInspectionPlanSonVo> planSonList = this.patrolInspectionPlanSon(planIdList, formatter.format(new Date()), "DESC");
             LambdaQueryWrapper<PatrolInspectionSite> queryWrapper = Wrappers.lambdaQuery();
-            queryWrapper.eq(PatrolInspectionSite::getSiteNubmber, siteNubmber)
-                    .eq(PatrolInspectionSite::getTenantId, SecurityUtils.getTenantId());
+            queryWrapper
+                    .eq(PatrolInspectionSite::getTenantId, SecurityUtils.getTenantId())
+                    .eq(PatrolInspectionSite::getSiteNubmber, siteNubmber);
             List<PatrolInspectionSite> siteList = patrolInspectionSiteService.list(queryWrapper);
 //            List<Integer> siteIdList = new ArrayList<>();
 //            for (int i = 0; i < siteList.size(); i++) {
@@ -139,7 +140,7 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
             for (int i = 0; i < planSonList.size(); i++) {
                 for (int j = 0; j < planSiteSonList.size(); j++) {
                     if (planSonList.get(i).getId() == planSiteSonList.get(j).getPlanId()) {
-                        planSonList.get(i).setSiteId(siteList.get(i).getId());
+                        planSonList.get(i).setSiteId(siteList.get(0).getId());
                         list.add(planSonList.get(i));
                     }
                 }