| | |
| | | */ |
| | | package org.sxkj.fw.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import org.sxkj.fw.device.dto.FwDeviceMaintainPlanDTO; |
| | | import org.sxkj.fw.device.entity.FwDeviceMaintainPlanEntity; |
| | | import org.sxkj.fw.device.vo.FwDeviceMaintainPlanVO; |
| | |
| | | return fwDeviceMaintainPlanList; |
| | | } |
| | | |
| | | @Override |
| | | public void batchUpdateExpiredPlans(List<Long> planIds) { |
| | | if (planIds == null || planIds.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | // 构建更新条件 |
| | | LambdaUpdateWrapper<FwDeviceMaintainPlanEntity> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.in(FwDeviceMaintainPlanEntity::getId, planIds) |
| | | .set(FwDeviceMaintainPlanEntity::getMaintainStatus, 0); // 未维护状态 |
| | | |
| | | // 执行批量更新 |
| | | update(updateWrapper); |
| | | } |
| | | } |