package com.jwipc.finance.logic;

import com.jwipc.finance.dto.PaymentAdvanceApplyListDTO;
import com.jwipc.finance.dto.PaymentAdvanceApplySaveDto;
import com.jwipc.finance.model.po.CreatePcaDetailPO;
import com.jwipc.finance.model.query.PaymentApplyHeadQuery;
import com.jwipc.finance.model.query.PaymentApplyItemQuery;
import com.jwipc.page.PageView;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author wt
 * @version 1.0
 * @since 2024/3/8
 */
public interface PaymentAdvanceApplyLogic {
    /**
     * 查询列表
     * @param query
     * @return
     */
    PageView selectListByPage(PaymentApplyHeadQuery query);

    /**
     * 查询数据根据id
     * @param id
     * @return
     */
    PaymentAdvanceApplyListDTO selectById(Long id);

    /**
     *数据保存
     * @param data
     */
    void dataSave(PaymentAdvanceApplySaveDto data) throws Exception;
    List<String> saveCheck(PaymentAdvanceApplySaveDto data);
    /**
     * 影像化
     * @param appId 预付款申请ID
     */
    void toPoImg(Long appId);
    void toImg(String id);
    /**
     * 删除影像化
     * @param appId 预付款申请ID
     */
    void deleteImg(Long appId);
    void deletePoImg(Long appId);
    /**
     * 删除预付款
     * @param applyIdList
     */
    void delAdvanceApply(List<Long> applyIdList);

    void approvalPass(String ids);

    List<CreatePcaDetailPO> findByQuery(PaymentApplyItemQuery query);

    /**
     * 提交OA
     * @param applyId 预付款id
     */
    void pushOa(String applyId);
    void pushOpen(String applyId);

    String importData(MultipartFile file);

    PageView paaOrderListByPage(PaymentApplyHeadQuery query);

    /**
     * 查询预付款采购订单信息，过滤金额小于申请金额的订单
     * @param query
     * @return
     */
    PageView paaOrderFilterAmountList(PaymentApplyHeadQuery query);

    void sendEmailCollection(Long id);
}
