|
@@ -191,14 +191,14 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
|
|
|
if (ObjectUtil.isEmpty(entry)) return false;
|
|
|
int interval = entry.getPlanInterval();
|
|
|
List<MaintenancePlan> planList = maintenancePlanService.findPlanList(liftId, projectId, mtCompanyId, request.getCurrentTime(), "record");
|
|
|
+ //提前保养跳过当前保养的计划
|
|
|
+ Iterator<MaintenancePlan> iterator = planList.iterator();
|
|
|
+ if (iterator.hasNext()) {
|
|
|
+ MaintenancePlan next = iterator.next();
|
|
|
+ if (Objects.nonNull(next))
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
if (CollUtil.isNotEmpty(planList)) {
|
|
|
- //提前保养跳过当前保养的计划
|
|
|
- Iterator<MaintenancePlan> iterator = planList.iterator();
|
|
|
- if (iterator.hasNext()) {
|
|
|
- MaintenancePlan next = iterator.next();
|
|
|
- if (Objects.nonNull(next))
|
|
|
- iterator.remove();
|
|
|
- }
|
|
|
//获取当前时间后的维保计划列表,并清除计划
|
|
|
maintenancePlanService.removeByIds(planList.stream().map(MaintenancePlan::getId).collect(Collectors.toList()));
|
|
|
}
|