package com.jwipc.sys.logic;

import com.jwipc.page.PageView;
import com.jwipc.sys.dto.PurchaseGroupDTO;
import com.jwipc.sys.dto.PurchaseGroupFactoryExportDTO;
import com.jwipc.sys.dto.UserPurGroupTreeDTO;
import com.jwipc.sys.dto.UserPurchaseGroupUpdateDTO;
import com.jwipc.sys.model.param.PurchaseGroupParam;
import com.jwipc.sys.model.query.PurchaseGroupFactoryQuery;
import com.jwipc.sys.model.query.PurchaseGroupQuery;
import com.jwipc.sys.model.query.UserPurchaseGroupUpdateQuery;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author shenyang.ou
 * @date 2024/1/29 15:01
 * @desc
 */
public interface PurchaseGroupLogic {
    PageView findByPage(PurchaseGroupQuery query);
    List<PurchaseGroupDTO> listAll(PurchaseGroupQuery query);

    PurchaseGroupDTO getById(Long id);
    PurchaseGroupDTO getByCode(String purchaseGroupCode);
//
    void saveOrUpdate(PurchaseGroupParam param);
//
    void remove(String purchaseGroupCode);
    List<UserPurGroupTreeDTO> getForTree(Long userId);


    PageView getFactoryList(PurchaseGroupFactoryQuery query);

    void factoryImportData(MultipartFile file);

    List<PurchaseGroupFactoryExportDTO> getFactoryForExport(PurchaseGroupFactoryQuery query);

    void updateFactoryStatus(String ids, Integer status);

    List<UserPurchaseGroupUpdateDTO> createListAll(UserPurchaseGroupUpdateQuery query);
}
