package cn.superdesk.uniorder.dubbo.facade.invoice.supplier;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.invoice.supplier.InvoiceApplySupplier;
import cn.superdesk.uniorder.dto.param.invoice.supplier.InvoiceApplySupplierPageVoListQueryCriteria;
import cn.superdesk.uniorder.dto.param.invoice.supplier.InvoiceApplySupplierParam;
import cn.superdesk.uniorder.dto.param.invoice.supplier.InvoiceApplySupplierQueryCriteria;
import cn.superdesk.uniorder.dto.param.invoice.supplier.status.InvoiceApplySupplierOpCommonDimAccountingOrderForm;
import cn.superdesk.uniorder.dto.vo.invoice.supplier.InvoiceApplySupplierDetailDimGoodsVo;
import cn.superdesk.uniorder.dto.param.invoice.supplier.InvoiceApplySupplierOpApplyForm;
import cn.superdesk.uniorder.dto.vo.invoice.supplier.InvoiceApplySupplierPageVo;
import cn.superdesk.uniorder.dto.vo.invoice.supplier.InvoiceApplySupplierSelectGoodsVo;
import cn.superdesk.uniorder.dto.vo.invoice.supplier.InvoiceApplySupplierHeadVo;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 重构 供应商 开票申请
 * @Author: linjinyu
 * @CreateDate: 2020/11/4 上午10:02
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020/11/4 上午10:02
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface DubboInvoiceApplySupplierService {

	/****************************************** extends BaseService 部分 start ******************************************/

	@Deprecated
	void addObj(InvoiceApplySupplierParam param);

	@Deprecated
	void updateObj(InvoiceApplySupplierParam param);

	InvoiceApplySupplier updateObj(InvoiceApplySupplier update);

	@Deprecated
	void deleteObj(Long id);

	@Deprecated
	InvoiceApplySupplier findById(Long id);

	List<InvoiceApplySupplier> findByIds(List<Long> invoiceApplyIds);

	List<InvoiceApplySupplier> findByAccountingOrderSn(String accountingOrderSn);

	@Deprecated
	PageInfo<InvoiceApplySupplier> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize);

	@Deprecated
	List<InvoiceApplySupplier> findAll(Map<String, Object> queryMap);

	/****************************************** extends BaseService 部分   end ******************************************/


	void addInvoiceApplySupplier(InvoiceApplySupplierParam param);

	void updateInvoiceApplySupplier(InvoiceApplySupplierParam param);

	int updateInvoiceApplySupplierByPrimaryKeySelective(InvoiceApplySupplier entity);

	void deleteInvoiceApplySupplier(Long id);

	InvoiceApplySupplier findInvoiceApplySupplierById(Long id);

	R<List<InvoiceApplySupplier>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize);

	R<List<InvoiceApplySupplier>> pageQueryGenericParam(InvoiceApplySupplierQueryCriteria criteria);


	/****************************************** 重构前存在 start ******************************************/

	R<List<InvoiceApplySupplier>> getInvoiceApplySupplierList(Map<String, Object> params, int pageNum, int pageSize);

	R<List<InvoiceApplySupplierPageVo>> getInvoiceApplySupplierPageVoList(InvoiceApplySupplierPageVoListQueryCriteria queryCriteria, LoginSysUser loginSysUser);

	InvoiceApplySupplierHeadVo getInvoiceApplyListHeadSum(Map<String, Object> params);

	InvoiceApplySupplierDetailDimGoodsVo getInvoiceApplySupplierDetailByInvoiceApplySupplierId(Long invoiceApplySupplierId, LoginSysUser loginSysUser);

	List<InvoiceApplySupplierSelectGoodsVo> getStatementOfAccountGoodsListByAccountingOrderSn(String accountingOrderSn);

	List<InvoiceApplySupplierSelectGoodsVo> getStatementOfAccountGoodsListBySysUnifiedOrderGoodsIds(String accountingOrderSn, List<Long> processSysUnifiedOrderGoodsIds);

	/****************************************** 开票申请 start ******************************************/

	List<InvoiceApplySupplierSelectGoodsVo> invoiceApplySelectFocusUnified(String accountingOrderSn);

//    UnifiedSupplierInv opInvoiceApply(UnifiedSupplierInvoiceAddParams add, String userid, String username, String roletype);

	// mark by linjinyu at 20210312
	InvoiceApplySupplier opInvoiceApply(InvoiceApplySupplierOpApplyForm invoiceApplySupplierOpApplyForm, LoginSysUser loginSysUser);

	/****************************************** 开票申请   end ******************************************/


	String opPhysicsDelete(InvoiceApplySupplier entity, LoginSysUser loginSysUser);

	String opBecomeInvalid(InvoiceApplySupplier entity, LoginSysUser loginSysUser);

	String opBecomeInvalid(List<InvoiceApplySupplier> entitys, InvoiceApplySupplierOpCommonDimAccountingOrderForm form, LoginSysUser loginSysUser);

	void patchInvoiceApplyFieldStatistics();


	/****************************************** 开票申请页面 导出数据 start ******************************************/

	String exportExcelInvoiceApplySupplierFocusScoreDimGoods(InvoiceApplySupplierPageVoListQueryCriteria queryCriteria, LoginSysUser loginSysUser);

	/****************************************** 开票申请页面 导出数据   end ******************************************/


}
