
package com.tmerclub.cloud.supplier.service;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.supplier.dto.SupplierCompanyAuditingDTO;
import com.tmerclub.cloud.supplier.dto.SupplierCompanyDTO;
import com.tmerclub.cloud.supplier.vo.SupplierCompanyAuditingVO;

/**
 * @author chiley
 * @date 2022/9/13 14:39
 */
public interface SupplierCompanyAuditingService {

    /**
     * 更新备注
     * @param supplierCompanyAuditingDTO
     */
    void updateRemark(SupplierCompanyAuditingDTO supplierCompanyAuditingDTO);

    /**
     * 供应商申请变更工商信息
     *
     * @param supplierCompanyDTO
     */
    void applyChangeCompanyInfo(SupplierCompanyDTO supplierCompanyDTO);

    /**
     * 根据供应商id获取最近一条工商审核信息
     *
     * @param supplierId
     * @return
     */
    SupplierCompanyAuditingVO getLatestAuditingBySupplierId(Long supplierId);


    /**
     * 撤销申请
     *
     * @param supplierId
     */
    void revoke(Long supplierId);

    /**
     * 分页获取待审核的工商信息
     *
     * @param pageDTO                分页参数
     * @param supplierCompanyAuditingDTO 搜索参数
     * @return
     */
    PageVO<SupplierCompanyAuditingVO> page(PageDTO pageDTO, SupplierCompanyAuditingDTO supplierCompanyAuditingDTO);

    /**
     * 审核公司信息
     * @param supplierCompanyAuditingDTO
     */
    void audit(SupplierCompanyAuditingDTO supplierCompanyAuditingDTO);

    /**
     * 获取供应商工商信息审核信息
     * @param supplierId
     * @return
     */
    SupplierCompanyAuditingVO getAuditInfo(Long supplierId);

    /**
     * 企业信息更新回调
     * @param bizUserId
     * @param status
     * @param result
     * @param failReason
     */
    void updateCompanyInfoResult(String bizUserId, Integer status, Integer result, String failReason);

    /**
     * 回调更新通联状态
     * @param bizUserId
     * @param status
     * @param failReason
     * @param isPassShop
     */
    void updateAllinpaySupplierStatus(String bizUserId, Integer status, String failReason, Integer isPassShop);
}
