|
@@ -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());
|