package com.jwipc.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.order.entity.DeliveryOrderControl;
import com.jwipc.order.entity.PurchaseOrderDevPlan;
import com.jwipc.order.mapper.DeliveryOrderControlMapper;
import com.jwipc.order.model.po.DeliveryOrderControlSelectPO;
import com.jwipc.order.model.query.DeliveryOrderControlQuery;
import com.jwipc.order.service.IDeliveryOrderControlService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 供应商送货单管控清单 服务实现类
 * </p>
 *
 * @author dengjsh
 * @since 2024-03-15
 */
@Service
public class DeliveryOrderControlServiceImpl extends ServiceImpl<DeliveryOrderControlMapper, DeliveryOrderControl> implements IDeliveryOrderControlService {


    public List<DeliveryOrderControlSelectPO> getListForSelect(Page<DeliveryOrderControlSelectPO> page, DeliveryOrderControlQuery query) {
        return this.baseMapper.getListForSelect(page,query);
    }

    public DeliveryOrderControl getControlNum(String supplierCode, String materialCode) {
        return getOne(
                new LambdaQueryWrapper<>(DeliveryOrderControl.class)
                        .eq(DeliveryOrderControl::getSupplierCode, supplierCode)
                        .eq(DeliveryOrderControl::getDeleteFlag, 0)
                        .eq(DeliveryOrderControl::getMaterialCode, materialCode));
    }

//    public List<DeliveryOrderControlSelectPO> getExportList(DeliveryOrderControlQuery query) {
//        return this.baseMapper.getList(query);
//    }
}
