/*
 *    Copyright (c) 2018-2025, hnqz All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: hnqz
 */

package com.qunzhixinxi.hnqz.admin.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qunzhixinxi.hnqz.admin.entity.WmDaAgent;
import com.qunzhixinxi.hnqz.common.core.util.R;
import feign.Param;

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

/**
 * 档案-代理商
 *
 * @author gaoyanng
 * @date 2020-06-25 23:35:42
 */
public interface WmDaAgentService extends IService<WmDaAgent> {



	public String getDeptBuildName(String deptId);

	public List<WmDaAgent> selectByScope(Wrapper<WmDaAgent> queryWrapper);

	public boolean saveAgent(WmDaAgent wmDaAgent);

	public IPage<WmDaAgent> listPage(Page page, WmDaAgent wmDaAgent);

	WmDaAgent selectByDeptId(Integer deptId);

	List selectByDrugIds(Integer id);

	List selectByRelationId(Integer id);

	List selectByRelationIds(Integer id);

	List selectByDrugId(Integer id);

	List selectEntNameByDrugIds(Integer id);

	List selectNameByDeptId(Integer deptId);

	List listByDept();

	int updateUserByDeptId(WmDaAgent wmDaAgent);

//	List selectByCsoIds(Integer id);

	IPage<WmDaAgent> selectWmManagementList(Page page, @Param("query")WmDaAgent wmDaAgent);

	R insert(WmDaAgent wmDaAgent);

	R updateByPrimaryKeySelective(@Param("query")WmDaAgent wmDaAgent);

	WmDaAgent selectDeptId(WmDaAgent wmDaAgent);

	List<Map<String,String>> selectDeptId1();

	List selectWmDaDrugEntByDeptId(Integer deptId);

	List selectWmDaDrugEntByDeptIds(Integer deptId);

	List selectWmDaAgentByRelationId(Integer deptId);

	List selectWmDaAgentByRelationIds(Integer deptId);

	List selectWmDaAgentByDeptId(String deptId);

	List selectWmDaAgentByDeptIds(String deptId);

	/**
	 * 根据sys_dept表的level字段查询
	 *
	 * @param deptLevel
	 * @return
	 */
	List<WmDaAgent> listAgentByDeptLevel(String deptLevel);

	/**
	 * 根据deptRelation查询
	 *
	 * @param deptId
	 * @return
	 */
	List<WmDaAgent> listAgentByDeptRelation(Integer deptId);
}
