package cn.superdesk.uniorder.dubbo.consumer.accounting.supplier;


import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.JwtUtil;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplierIssues;
import cn.superdesk.uniorder.dto.param.accounting.unified.supplier.AccountingUnifiedSupplierIssuesParam;
import cn.superdesk.uniorder.dubbo.facade.accounting.supplier.DubboAccountingUnifiedSupplierIssuesService;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

/**
 * @Description: 问题订单
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2021-02-24 13:44:11
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-02-24 13:44:11
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Component
public class AccountingUnifiedSupplierIssuesDubboConsumerService {

	@Reference(version = "1.0.0", timeout = 10000, retries = -1)
	private DubboAccountingUnifiedSupplierIssuesService dubboAccountingUnifiedSupplierIssuesService;


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

	public void addObj(AccountingUnifiedSupplierIssuesParam param) {

		dubboAccountingUnifiedSupplierIssuesService.addObj(param);

	}

	public void updateObj(AccountingUnifiedSupplierIssuesParam param) {

		dubboAccountingUnifiedSupplierIssuesService.updateObj(param);
	}

	public void deleteObj(Long id) {

		dubboAccountingUnifiedSupplierIssuesService.deleteObj(id);
	}

	public AccountingUnifiedSupplierIssues findById(Long id) {

		return dubboAccountingUnifiedSupplierIssuesService.findById(id);
	}

	public PageInfo<AccountingUnifiedSupplierIssues> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {

		return dubboAccountingUnifiedSupplierIssuesService.findByPaging(conditions, pageNun, pageSize);
	}

	public List<AccountingUnifiedSupplierIssues> findAll(Map<String, Object> queryMap) {

		return dubboAccountingUnifiedSupplierIssuesService.findAll(queryMap);
	}

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


	public void addAccountingUnifiedSupplierIssues(AccountingUnifiedSupplierIssuesParam param) {

		dubboAccountingUnifiedSupplierIssuesService.addAccountingUnifiedSupplierIssues(param);
	}


	public void updateAccountingUnifiedSupplierIssues(AccountingUnifiedSupplierIssuesParam param) {

		dubboAccountingUnifiedSupplierIssuesService.updateAccountingUnifiedSupplierIssues(param);
	}


	public void deleteAccountingUnifiedSupplierIssues(Long id) {
		dubboAccountingUnifiedSupplierIssuesService.deleteAccountingUnifiedSupplierIssues(id);
	}


	public AccountingUnifiedSupplierIssues findAccountingUnifiedSupplierIssuesById(Long id) {

		return dubboAccountingUnifiedSupplierIssuesService.findAccountingUnifiedSupplierIssuesById(id);
	}


	public R<List<AccountingUnifiedSupplierIssues>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {

		return dubboAccountingUnifiedSupplierIssuesService.pageQuery(conditions, pageNun, pageSize);
	}


	public void init001AccountingUnifiedSupplierIssuess(String token, Integer isCreateExcel) {

		LoginSysUser loginSysUser = JwtUtil.getLoginSysUser(token);

		dubboAccountingUnifiedSupplierIssuesService.init001AccountingUnifiedSupplierIssuess(isCreateExcel, loginSysUser);
	}

}
