package org.jeecg.modules.eam.service.impl; import org.jeecg.modules.eam.entity.EquipmentMaintenancePlan; import org.jeecg.modules.eam.entity.MaintenanceStandardDetail; import org.jeecg.modules.eam.mapper.EquipmentMaintenancePlanDetailMapper; import org.jeecg.modules.eam.mapper.EquipmentMaintenancePlanMapper; import org.jeecg.modules.eam.service.IEquipmentMaintenancePlanService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.Collection; import java.util.List; /** * @Description: 保养计划 * @Author: jeecg-boot * @Date: 2023-10-16 * @Version: V1.0 */ @Service public class EquipmentMaintenancePlanServiceImpl extends ServiceImpl implements IEquipmentMaintenancePlanService { @Autowired private EquipmentMaintenancePlanMapper equipmentMaintenancePlanMapper; @Autowired private EquipmentMaintenancePlanDetailMapper equipmentMaintenancePlanDetailMapper; @Override @Transactional(rollbackFor = Exception.class) public void delMain(String id) { equipmentMaintenancePlanDetailMapper.deleteByMainId(id); equipmentMaintenancePlanMapper.deleteById(id); } @Override @Transactional(rollbackFor = Exception.class) public void delBatchMain(Collection idList) { for(Serializable id:idList) { equipmentMaintenancePlanDetailMapper.deleteByMainId(id.toString()); equipmentMaintenancePlanMapper.deleteById(id); } } @Override public List getCycle(String mainId, String type) { return baseMapper.getCycle(mainId,type); } }