package com.zjt.service.impl;

import com.zjt.entity.*;
import com.zjt.mapper.*;
import com.zjt.mapper.ProductionVarietyDetailColourMapper;
import com.zjt.service.IProductionVarietyDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xxu
 * @since 2025-09-25
 */
@Service
public class ProductionVarietyDetailServiceImpl extends ServiceImpl<ProductionVarietyDetailMapper, ProductionVarietyDetail> implements IProductionVarietyDetailService {

    @Resource
    ProductionVarietyDetailMapper ProductionVarietyDetailMapper;
    @Resource
    ProductionheaderMapper ProductionheaderMapper;
    @Resource
    ProductionVarietyDetailColourMapper ProductionVarietyDetailColourMapper;
    @Resource
    ProductionVarietyTdMapper ProductionVarietyTdMapper;
    @Resource
    SaleorderHeaderMapper SaleorderHeaderMapper;
    @Override
    public List<ProductionVarietyDetail> selectvarietyList() {
        List<ProductionVarietyDetail> productionVarietyDetails = ProductionVarietyDetailMapper.selectvarietyList();
        return productionVarietyDetails;
    }

    @Override
    public List<ProductionVarietyDetail> selectvarietyDetails(String  variety) {
        List<ProductionVarietyDetail> productionVarietyDetails = ProductionVarietyDetailMapper.selectvarietyDetails(variety);
        return productionVarietyDetails;
    }

    @Override
    public List<Productionheader> selectProductionheader(long varietyDetailId) {
        List<Productionheader>productionheaderDetails = ProductionheaderMapper.selectProductionheader(varietyDetailId);
        return productionheaderDetails;
    }

    @Override
    public List<ProductionVarietyDetailColour> selectColour(long varietyDetailId) {
        List<ProductionVarietyDetailColour>ProductionVarietyDetailColour = ProductionVarietyDetailColourMapper.selectColour(varietyDetailId);
        return ProductionVarietyDetailColour;
    }

    @Override
    public List<ProductionVarietyTd> selectChannel(long varietyId) {
        List<ProductionVarietyTd> ProductionVarietyTd=ProductionVarietyTdMapper.selectChannel(varietyId);
        return ProductionVarietyTd;
    }

    @Override
    public void insertSh(SaleorderHeader saleorderHeader) {
        SaleorderHeaderMapper.insertSh(saleorderHeader);
    }


}
