package com.yeejoin.amos.boot.module.tcm.api.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzIndividualityDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.tcm.api.entity.PageParam;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo;

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

/**
 * 企业数据信息 服务类
 *
 * @author duanwei
 * @date 2022-08-10
 */
public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseInfo> {

	/**
	 * 查找企业关联设备详情列表
	 * 
	 * @param sequenceNbr 企业id
	 * @return EquEnterDto 使用登记证代码、设备名称、设备类别、设备位置
	 */
	List<EquEnterDto> getInfo(String sequenceNbr);

	IPage<TzBaseEnterpriseInfoDto> page(PageParam pageParam, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, String sort);

	TzBaseEnterpriseInfoDto detail(Long id);
	IPage<TzBaseEnterpriseInfoDto> page(PageParam pageParam, String companyName);

	List<EquEnterDto> getInfoByUseUnit(String useUnit);

	TzBaseEnterpriseInfoDto selectByUseUnit(String useUnit);

	String syncEnterpriseInfo();

	TzBaseEnterpriseInfoDto companyInfoUpdate(Map<String, Object> map, ReginParams selectedOrgInfo);

	Map<String,Object> adminInfoUpdate(Map<String, Object> map);

	TzBaseEnterpriseInfoDto getInfoByUseCode(String useCode);

	String setLabel(List<Long> enterpriseIds, List<String> enterpriseLabels);

	BaseUnitLicence getUnitLicenceMessage(String unitCode);

	Map<String, Object> getInfoByUseCodeMap(String useCode);

	IPage<TzBaseEnterpriseInfoDto> getInfoById(Long sequenceNbr, String companyCode);

	TzBaseEnterpriseInfoDto updateCompanyInfoById(Map<String, Object> map, ReginParams selectedOrgInfo);

	TzIndividualityDto personalInfoUpdateById(Map<String, Object> map);

	void refreshCompanyInfo(JSONObject dataResult, String method);

	void refreshSupervisionOrgCode(JSONObject dataResult, String newOrgCode, String oldOrgCode);

}
