btyjj-inspection/src/main/java/com/cm/inspection/service/enterprise/IEnterpriseService.java

170 lines
4.1 KiB
Java

package com.cm.inspection.service.enterprise;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultData;
import com.cm.common.result.SuccessResultList;
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
import com.cm.inspection.pojo.vos.enterprise.EnterpriseVO;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IEnterpriseService
* @Description: 企业
* @Author: WenG
* @Date: 2020-03-25 22:58
* @Version: 1.0
**/
public interface IEnterpriseService {
/**
* 新增企业
*
* @param enterpriseVO
* @return
* @throws Exception
*/
SuccessResult saveEnterprise(EnterpriseVO enterpriseVO) throws Exception;
/**
* 新增企业(APP)
*
* @param token
* @param enterpriseVO
* @return
* @throws Exception
*/
SuccessResult saveEnterpriseByToken(String token, EnterpriseVO enterpriseVO) throws Exception;
/**
* 新增企业(APP)
*
* @param token
* @param enterpriseVO
* @return 返回ID
* @throws SearchException
*/
SuccessResultData<String> saveEnterpriseByTokenReturnId(String token, EnterpriseVO enterpriseVO) throws Exception;
/**
* 删除企业
*
* @param ids
* @return
* @throws RemoveException
*/
SuccessResult removeEnterprise(String ids) throws RemoveException;
/**
* 删除企业(APP)
*
* @param token
* @param ids
* @return
* @throws RemoveException
*/
SuccessResult removeEnterpriseByToken(String token, String ids) throws RemoveException;
/**
* 修改企业
*
* @param enterpriseId
* @param enterpriseVO
* @return
* @throws Exception
*/
SuccessResult updateEnterprise(String enterpriseId, EnterpriseVO enterpriseVO) throws Exception;
/**
* 修改企业(APP)
*
* @param token
* @param enterpriseId
* @param enterpriseVO
* @return
* @throws Exception
*/
SuccessResult updateEnterpriseByToken(String token, String enterpriseId, EnterpriseVO enterpriseVO) throws Exception;
/**
* 更新企业位置
*
* @param enterpriseId
* @param checkLng
* @param checkLat
* @throws UpdateException
*/
void updateEnterpriseLocationByEnterpriseId(String enterpriseId, String checkLng, String checkLat) throws UpdateException;
/**
* 更新企业位置
*
* @param token
* @param enterpriseId
* @param checkLng
* @param checkLat
*/
void updateEnterpriseLocationByTokenAndEnterpriseId(String token, String enterpriseId, String checkLng, String checkLat);
/**
* 企业详情(通过ID)
*
* @param enterpriseId
* @return
* @throws SearchException
*/
EnterpriseDTO getEnterpriseById(String enterpriseId) throws SearchException;
/**
* 企业详情单表(通过ID)
*
* @param enterpriseId
* @return
* @throws SearchException
*/
EnterpriseDTO getEnterpriseSingleById(String enterpriseId) throws SearchException;
/**
* 企业列表
*
* @param params
* @return
* @throws SearchException
*/
List<EnterpriseDTO> listEnterprise(Map<String, Object> params) throws SearchException;
/**
* 企业分页列表
*
* @param page
* @return
* @throws SearchException
*/
SuccessResultList<List<EnterpriseDTO>> listPageEnterprise(ListPage page) throws SearchException;
/**
* 统计企业
*
* @param params
* @return
* @throws SearchException
*/
SuccessResultData<Integer> countEnterprise(Map<String, Object> params) throws SearchException;
/**
* 企业统计(行业性质)
*
* @param params
* @return
* @throws SearchException
*/
SuccessResultData<Map<String, Object>> countEnterpriseByNature(Map<String, Object> params) throws SearchException;
}