package com.jwipc.tender.logic;

import com.jwipc.page.PageView;
import com.jwipc.tender.dto.QuotaManagementDTO;
import com.jwipc.tender.dto.QuotaManagementSaveDTO;
import com.jwipc.tender.entity.QuotaManagement;
import com.jwipc.tender.model.query.QuotaEditQuery;
import com.jwipc.tender.model.query.QuotaManagementQuery;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author AL
 * @date 2024/1/29 15:01
 * @desc 模具
 */
public interface QuotaManagementLogic {
    PageView findByPage(QuotaManagementQuery query);
    PageView bidFindByPage(QuotaManagementQuery query);
    PageView editFindByPage(QuotaEditQuery query);
    PageView supplierFindByPage(QuotaEditQuery query);
    List<QuotaManagementDTO> findByQuery(QuotaManagementQuery query);
   // void saveOrUpdate(String quotaListJson, CurrentUserDTO user);
    void saveOrUpdate(List<QuotaManagementSaveDTO> param);
    /**
     * 获取配額清單列表
     * @param query  参数
     * @return 配额清单列表
     */
    List<QuotaManagementDTO> listAll(QuotaManagementQuery query);
    List<QuotaManagementDTO> listAllExport(QuotaManagementQuery query);

    String importData(MultipartFile file);

    void pushOa(String quotaCode);

    List<QuotaManagement> getByMaterialCodeAndFactoryCode(String materialCode, String factoryCode);

    QuotaManagement getByMaterialCodeAndFactoryCodeMaxQuote(String materialCode, String factoryCode);

    QuotaManagement getQuota(String materialCode, String factoryCode, String supplierCode);

    void deleteByMaterialCode(String materialCode);

    void saveQuota(List<QuotaManagement> quotaManagements);

    void deleteByMaterialCodeAndFactoryCode(String materialCode, String factoryCode);
}
