package com.gyee.frame.service.impl.ticket;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gyee.frame.model.ticket.Wosaferun;
import com.gyee.frame.mapper.ticket.WosaferunMapper;
import com.gyee.frame.model.ticket.Wosafety;
import com.gyee.frame.service.ticket.WosaferunService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenmh
 * @since 2020-06-08
 */
@Service
public class WosaferunServiceImpl extends ServiceImpl<WosaferunMapper, Wosaferun> implements WosaferunService {

    @Override
    public int selectMaxId() {
        return baseMapper.selectMaxId();
    }

    @Override
    public List<Wosaferun> getListSafeMeasure(String woNum) {
        QueryWrapper<Wosaferun> wrapper = new QueryWrapper<>();
        wrapper.eq("WONUM", woNum);

        List<Wosaferun> list = baseMapper.selectList(wrapper);

        return list;
    }

    @Override
    public Integer deleteSafeMeasure(List<Double> list) {
        int result = baseMapper.deleteBatchIds(list);
        return result;
    }
}
