Explorar el Código

巡检人员相关接口查询调整

jichaobo hace 2 años
padre
commit
ee179dfa74

+ 22 - 12
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanServiceImpl.java

@@ -572,20 +572,30 @@ public class PatrolInspectionPlanServiceImpl extends AbstractCrudService<PatrolI
             patrolInspectionPlanDataVo.setCompanyId(patrolInspectionPlanSonList.get(i).getCompanyId());
             patrolInspectionPlanDataVo.setRestDay(patrolInspectionPlanSonList.get(i).getRestDay());
             patrolInspectionPlanDataVo.setWeekCount(patrolInspectionPlanSonList.get(i).getWeekCount());
-            List<PlanScheduleVo> list2 = new ArrayList<>();
-            for (int j = 0; j < list.size(); j++) {
-                if (patrolInspectionPlanSonList.get(i).getId() == list.get(j).getPlanId()) {
-                    list.get(j).setWeekOne(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期一") ? true : false);
-                    list.get(j).setWeekTwo(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期二") ? true : false);
-                    list.get(j).setWeekThree(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期三") ? true : false);
-                    list.get(j).setWeekFour(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期四") ? true : false);
-                    list.get(j).setWeekFive(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期五") ? true : false);
-                    list.get(j).setWeekSix(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期六") ? true : false);
-                    list.get(j).setWeekSeven(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期日") ? true : false);
-                    list2.add(list.get(j));
+            if (planType == 1) {
+                List<PlanScheduleVo> list2 = new ArrayList<>();
+                for (int j = 0; j < list.size(); j++) {
+                    if (patrolInspectionPlanSonList.get(i).getId() == list.get(j).getPlanId()) {
+                        list.get(j).setWeekOne(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期一") ? true : false);
+                        list.get(j).setWeekTwo(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期二") ? true : false);
+                        list.get(j).setWeekThree(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期三") ? true : false);
+                        list.get(j).setWeekFour(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期四") ? true : false);
+                        list.get(j).setWeekFive(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期五") ? true : false);
+                        list.get(j).setWeekSix(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期六") ? true : false);
+                        list.get(j).setWeekSeven(patrolInspectionPlanSonList.get(i).getRestDay().contains("星期日") ? true : false);
+                        list2.add(list.get(j));
+                    }
+                }
+                patrolInspectionPlanDataVo.setChildrenList(list2);
+            }else  if (planType == 2){
+                for (int j = 0; j < list.size(); j++) {
+                    if (patrolInspectionPlanSonList.get(i).getId() == list.get(j).getPlanId()) {
+                        patrolInspectionPlanDataVo.setPersonneName(list.get(j).getPersonnelName());
+                        patrolInspectionPlanDataVo.setPersonneId(list.get(j).getPersonnelId());
+                    }
                 }
+
             }
-            patrolInspectionPlanDataVo.setChildrenList(list2);
             list1.add(patrolInspectionPlanDataVo);
         }
         List<PatrolInspectionPlanDataVo> list3 = list1.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());

+ 10 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/PatrolInspectionPlanDataVo.java

@@ -122,5 +122,15 @@ public class PatrolInspectionPlanDataVo implements Serializable {
      */
     private List<PlanScheduleVo> childrenList;
 
+    /**
+     * 责任人
+     */
+    private String personneName;
+
+    /**
+     * 巡检人员表主键ID
+     */
+    private Integer personneId;
+
 
 }