package com.hzs.scm.sale.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.core.enums.EYesNo;
import com.hzs.common.domain.scm.sale.IcDelSaleLog;
import com.hzs.scm.sale.mapper.IcDelSaleLogMapper;
import com.hzs.scm.sale.service.IIcDelSaleLogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 发货单生成销售出库日志 服务实现类
 *
 * @author hzs
 * @since 2023-12-01
 */
@Service
public class IcDelSaleLogServiceImpl extends ServiceImpl<IcDelSaleLogMapper, IcDelSaleLog> implements IIcDelSaleLogService {

    @Override
    public List<IcDelSaleLog> queryDelSaleLog(IcDelSaleLog icDelSaleLog) {
        QueryWrapper<IcDelSaleLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("SUCCESS_STATUS", EYesNo.NO.getIntValue());
        queryWrapper.eq("BILL_TYPE", 1);
        queryWrapper.eq("PK_CREATOR", icDelSaleLog.getPkCreator());
        return baseMapper.selectList(queryWrapper);
    }
}
