package cn.superdesk.uniorder.service.accounting.unified.customer;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.enums.accounting.AccountingOrderDimCreateByEnum;
import cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomer;
import cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomerOrder;
import cn.superdesk.uniorder.dao.entity.accounting.unified.customer.AccountingUnifiedCustomerXGoods;
import cn.superdesk.uniorder.dao.entity.base.UnifiedOrder;
import cn.superdesk.uniorder.dao.entity.base.UnifiedOrderGoods;
import cn.superdesk.uniorder.service.base.BaseService;
import com.github.pagehelper.PageInfo;

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


/**
 * @Description:
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2021-01-06 17:46:38
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-01-06 17:46:38
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface AccountingUnifiedCustomerXGoodsService extends BaseService<AccountingUnifiedCustomerXGoods> {


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

	int insertSelective(AccountingUnifiedCustomerXGoods entity);

    int updateByPrimaryKeySelective(AccountingUnifiedCustomerXGoods entity);

	@Deprecated
	void deleteObj(Long id);

	void deleteByAccountingOrderIdAndOrderSn(Long accountingOrderId, String orderSn);

	void deleteByAccountingOrderIdAndOrderSnAndSysUnifiedOrderGoodsIds(Long accountingOrderId, String orderSn, List<Long> sysUnifiedOrderGoodsIds);

	@Deprecated
	AccountingUnifiedCustomerXGoods findById(Long id);

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

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

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


	void addAccountingUnifiedCustomerXGoods(AccountingUnifiedCustomerXGoods entity);

	void updateAccountingUnifiedCustomerXGoods(AccountingUnifiedCustomerXGoods entity);

	void deleteAccountingUnifiedCustomerXGoods(Long id);

	AccountingUnifiedCustomerXGoods findAccountingUnifiedCustomerXGoodsById(Long id);

	List<AccountingUnifiedCustomerXGoods> findByAccountingOrderId(Long accountingOrderId);

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


	/****************************************** 工具方法 start ******************************************/

	/**
	 * 组成 合成 而已 返回 xGoods
	 * @param accountingUnifiedCustomer
	 * @param unifiedOrder
	 * @param unifiedOrderGoods
	 * @param accountingOrderDimCreateByEnum
	 * @param processDate
	 * @return
	 */
	AccountingUnifiedCustomerXGoods composeAccountingUnifiedCustomerXGoods01(AccountingUnifiedCustomer accountingUnifiedCustomer,
			/* 注意 */UnifiedOrder unifiedOrder,
			                                                                 UnifiedOrderGoods unifiedOrderGoods,
			                                                                 AccountingOrderDimCreateByEnum accountingOrderDimCreateByEnum,
			                                                                 Date processDate);

	/**
	 * 组成 合成 而已 返回 xGoods
	 *
	 * @param accountingUnifiedCustomer
	 * @param accountingUnifiedCustomerOrder
	 * @param unifiedOrderGoods
	 * @param accountingOrderDimCreateByEnum
	 * @param processDate
	 */
	AccountingUnifiedCustomerXGoods composeAccountingUnifiedCustomerXGoods02(AccountingUnifiedCustomer accountingUnifiedCustomer,
			/* 注意 */AccountingUnifiedCustomerOrder accountingUnifiedCustomerOrder,
	                                                                         UnifiedOrderGoods unifiedOrderGoods,
	                                                                         AccountingOrderDimCreateByEnum accountingOrderDimCreateByEnum,
	                                                                         Date processDate);

	int insertBatch(List<AccountingUnifiedCustomerXGoods> processList);


}