| | |
| | | */ |
| | | 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; |
| | | import org.sxkj.fw.device.excel.FwDeviceMaintainPlanExcel; |
| | |
| | | /** |
| | | * 设备维护计划表 服务实现类 |
| | | * |
| | | * @author lw |
| | | * @since 2026-01-07 |
| | | * @author Aix |
| | | * @since 2026-01-09 |
| | | */ |
| | | @Service |
| | | public class FwDeviceMaintainPlanServiceImpl extends BaseServiceImpl<FwDeviceMaintainPlanMapper, FwDeviceMaintainPlanEntity> implements IFwDeviceMaintainPlanService { |
| | | |
| | | |
| | | @Override |
| | | public IPage<FwDeviceMaintainPlanVO> selectFwDeviceMaintainPlanPage(IPage<FwDeviceMaintainPlanVO> page, FwDeviceMaintainPlanVO fwDeviceMaintainPlan) { |
| | | public FwDeviceMaintainPlanVO getFwDeviceMaintainPlanById(Long id) { |
| | | return baseMapper.getFwDeviceMaintainPlanById(id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<FwDeviceMaintainPlanVO> selectFwDeviceMaintainPlanPage(IPage<FwDeviceMaintainPlanVO> page, FwDeviceMaintainPlanDTO fwDeviceMaintainPlan) { |
| | | return page.setRecords(baseMapper.selectFwDeviceMaintainPlanPage(page, fwDeviceMaintainPlan)); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |