package com.hzs.scm.pub;

import com.hzs.common.core.domain.R;
import com.hzs.common.core.enums.EApprovalBusiness;
import com.hzs.common.domain.sale.ext.SaOrderExt;
import com.hzs.common.domain.scm.ic.IcAvailableNum;
import com.hzs.common.domain.scm.ic.ext.IcAvailableNumExt;
import com.hzs.scm.pub.dto.BillDTO;
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;

import java.util.List;

/**
 * @description: 供应链单据对外接口发布
 * @author: sui q
 * @time: 2023/11/25 09:21
 * @classname: IScmBillServiceApi
 * @package_name: com.hzs.scm.ic
 * version 1.0.0
 */
public interface IScmBillServiceApi {

    /**
     * 活动服务信息处理回调
     *
     * @param approvalBusinessResultDTO 参数
     * @return
     */
    R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO);

    /*
     * @description: 查询单据信息
     * @author: sui q
     * @date: 2023/11/25 9:38
     * @param: null null
     **/
    R<List<BillDTO>> queryBillDtoByCondition(EApprovalBusiness eApprovalBusiness, String businessCode);

    /*
     * @description: 下单时验证可用量
     * @author: sui q
     * @date: 2023/12/11 10:01
     * @param: null null
     **/
    R<List<IcAvailableNumExt>> queryAvailableNumByProduct(List<IcAvailableNum> availableNumList);

    /*
     * @description: 更新可用量
     * @author: sui q
     * @date: 2023/12/18 9:28
     * @param: null null
     **/
    R<Boolean> updateDeductIcAvailableNumByList(List<IcAvailableNumExt> availableNumList);

    /*
     * @description: 更新单据号规则
     * @author: sui q
     * @date: 2024/2/21 15:40
     * @param: null null
     **/
    R<Boolean> updateScmBillNoNextValue();

    /*
     * @description: 撤单、退单回退可用量
     * @author: sui q
     * @date: 2024/4/17 10:13
     * @param: null null
     **/
    R<Boolean> backSaOrderAvailable(SaOrderExt saOrderExt);
}
