/**
 * Copyright 2019 DH
 * All right reserved.
 * 项目名称: 大恒泰山系统
 * 创建日期:2022/8/23
 */
package org.springblade.modules.business.equipment.inspection.plan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
import org.springblade.modules.business.check.process.mapper.RtuOrderProcessMapper;
import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
import org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanMapper;
import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
import org.springframework.stereotype.Service;

/***
 * Date:2022/8/23
 * Title:文件所属模块（必须填写）
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author dylan
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
@Service
public class EquipmentInspectionPlanServiceImpl extends BaseServiceImpl<EquipmentInspectionPlanMapper, EquipmentInspectionPlanEntity> implements IEquipmentInspectionPlanService {


	@Override
	public EquipmentInspectionPlanEntity yearPlan() {
		LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
		wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted,0);
		wrapper.orderByDesc(EquipmentInspectionPlanEntity::getCreateTime);
		wrapper.last("limit 1");
		return baseMapper.selectOne(wrapper);
	}
}
