Commit a803d572 authored by neo's avatar neo

[DEL] delete enterprise account service interface

parent 2d4ffbb9
...@@ -29,7 +29,7 @@ import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountAndValidateInfo; ...@@ -29,7 +29,7 @@ import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountAndValidateInfo;
import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto; import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto;
import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountUploadDto; import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountUploadDto;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.EnterpriseAccountService; import pwc.taxtech.atms.service.impl.EnterpriseAccountServiceImpl;
import pwc.taxtech.atms.service.impl.EnterpriseAccountSetServiceImpl; import pwc.taxtech.atms.service.impl.EnterpriseAccountSetServiceImpl;
import pwc.taxtech.atms.service.impl.FileService; import pwc.taxtech.atms.service.impl.FileService;
...@@ -51,7 +51,7 @@ public class EnterpriseAccountManagerController { ...@@ -51,7 +51,7 @@ public class EnterpriseAccountManagerController {
@Autowired @Autowired
private EnterpriseAccountSetServiceImpl enterpriseAccountSetService; private EnterpriseAccountSetServiceImpl enterpriseAccountSetService;
@Autowired @Autowired
private EnterpriseAccountService enterpriseAccountService; private EnterpriseAccountServiceImpl enterpriseAccountService;
@Autowired @Autowired
private FileService fileService; private FileService fileService;
......
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dpo.EnterpriseAccountDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.epaccount.AccountMapDto;
import pwc.taxtech.atms.dto.epaccount.AccountMappingDto;
import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountAndValidateInfo;
import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto;
import pwc.taxtech.atms.entity.EnterpriseAccount;
public interface EnterpriseAccountService {
/**
* Get EnterpriseAccount
* @param enterpriseAccountCode
* @param accountSetId
* @return EnterpriseAccount
*/
EnterpriseAccount getEnterpriseAccount(String enterpriseAccountCode, String enterpriseAccountSetId);
/**
* 获取标准科目列表
* @param enterpriseAccountSetId
* @return EnterpriseAccountAndValidateInfo
*/
EnterpriseAccountAndValidateInfo getListByEnterpriseAccountSetId(String enterpriseAccountSetId);
/**
* 根据企业科目Id获取企业科目信息
* @param enterpriseAccountId
* @return The identifier.
*/
EnterpriseAccountDto getEnterpriseAccount(String enterpriseAccountId);
/**
* 新增企业科目
* @param enterpriseAccountDto
* @return OperationResultDto<List<EnterpriseAccountDto>>
*/
OperationResultDto<List<EnterpriseAccountDto>> addEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto);
/**
* 更新企业科目
* @param enterpriseAccountDto
* @return OperationResultDto<List<EnterpriseAccountDto>>
*/
OperationResultDto<List<EnterpriseAccountDto>> updateEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto);
/**
* 手动对应或者取消的时候更新父级以及以上的状态, 对应父级科目
* @param enterpriseAccountCodeList - 当前操作的企业科目代码的列表
* @param enterpriseAccountSetId - 当前企业科目所在的企业账套Id
* @param industryId - 机构下的行业,主要用于区分标准科目
* @param orgId - 机构Id
* @param isToUpdateEvenExists - 是否覆盖
*/
void mapAccountUpdateParent(List<String> enterpriseAccountCodeList, String enterpriseAccountSetId, String industryId, String orgId, Boolean isToUpdateEvenExists);
/**
* validate import excel format, data
* @param filePath
* @return
*/
OperationResultDto<List<EnterpriseAccountDto>> validateImportEnterpriseAccount(String filePath);
/**
* create enterprise account set and import list of enterprise accounts
* @param enterpriseAccountSetName - Name of the enterprise account set
* @param enterpriseAccountSetCode - Code of the enterprise account set
* @param importData
* @return
*/
@SuppressWarnings("rawtypes")
OperationResultDto addEnterpriseAccountSetAndImportData(String enterpriseAccountSetName,
String enterpriseAccountSetCode, List<EnterpriseAccountDto> importData);
/**
* Import enterprise accounts
* @param enterpriseAccountSetDto
* @param importData
* @return OperationResultDto
*/
@SuppressWarnings("rawtypes")
OperationResultDto repeatImportEnterpriseAccountSet(EnterpriseAccountSetDto enterpriseAccountSetDto, List<EnterpriseAccountDto> importData);
/**
* 删除重复企业科目
* @param enterpriseAccountSetDto
* @return
*/
@SuppressWarnings("rawtypes")
OperationResultDto clearRepeatEnterpriseAccountList(EnterpriseAccountSetDto enterpriseAccountSetDto);
List<AccountMappingDto> getAccountMappingOrg(String organizationId);
List<EnterpriseAccountSetDto> getEnterpriseAccountSetListByOrgId(String orgId);
List<EnterpriseAccountDto> getList(String epAccountSetId, String orgId, String filterType);
OperationResultDto autoMap(String orgId, String accountSetId);
OperationResultDto mapAccount(AccountMapDto accountMapDto);
OperationResultDto clearMap(String[] epAccountIds, String orgId);
}
...@@ -7,23 +7,23 @@ import pwc.taxtech.atms.common.CommonUtils; ...@@ -7,23 +7,23 @@ import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.entity.AccountMapping; import pwc.taxtech.atms.entity.AccountMapping;
import pwc.taxtech.atms.entity.AccountMappingExample; import pwc.taxtech.atms.entity.AccountMappingExample;
import pwc.taxtech.atms.entity.EnterpriseAccount; import pwc.taxtech.atms.entity.EnterpriseAccount;
import pwc.taxtech.atms.service.EnterpriseAccountService;
@Service @Service
public class AccountServiceImpl extends AbstractService { public class AccountServiceImpl extends AbstractService {
@Autowired @Autowired
EnterpriseAccountService enterpriseAccountService; EnterpriseAccountServiceImpl enterpriseAccountService;
/** /**
* 匹配标准科目到企业科目(按科目编码) * 匹配标准科目到企业科目(按科目编码)
*
* @param enterpriseAccountSetId - 账套Id * @param enterpriseAccountSetId - 账套Id
* @param stdAccountCode - 标准科目编码 * @param stdAccountCode - 标准科目编码
* @param epAccountCode - 企业科目编码 * @param epAccountCode - 企业科目编码
* @param industryId - 行业Id * @param industryId - 行业Id
* @param organizationId - 机构Id * @param organizationId - 机构Id
* @param bOverwrite - 是否覆盖已有对应 * @param bOverwrite - 是否覆盖已有对应
* @param acctLevel - 科目级别 * @param acctLevel - 科目级别
*/ */
public void mapStdAccountByCode(String enterpriseAccountSetId, String stdAccountCode, String epAccountCode, String industryId, String organizationId, public void mapStdAccountByCode(String enterpriseAccountSetId, String stdAccountCode, String epAccountCode, String industryId, String organizationId,
Boolean bOverwrite, Integer acctLevel) { Boolean bOverwrite, Integer acctLevel) {
......
...@@ -41,14 +41,13 @@ import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountAndValidateInfo; ...@@ -41,14 +41,13 @@ import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountAndValidateInfo;
import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto; import pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto;
import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto; import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.EnterpriseAccountService;
import java.io.InputStream; import java.io.InputStream;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
public class EnterpriseAccountServiceImpl extends AbstractService implements EnterpriseAccountService { public class EnterpriseAccountServiceImpl extends AbstractService {
@Autowired @Autowired
private AccountServiceImpl accountService; private AccountServiceImpl accountService;
...@@ -77,7 +76,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -77,7 +76,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#getEnterpriseAccount(java.lang.String, java.lang.String) * @see pwc.taxtech.atms.service.EnterpriseAccountService#getEnterpriseAccount(java.lang.String, java.lang.String)
*/ */
@Override
public EnterpriseAccount getEnterpriseAccount(String enterpriseAccountCode, String enterpriseAccountSetId) { public EnterpriseAccount getEnterpriseAccount(String enterpriseAccountCode, String enterpriseAccountSetId) {
EnterpriseAccountExample example = new EnterpriseAccountExample(); EnterpriseAccountExample example = new EnterpriseAccountExample();
example.createCriteria().andCodeEqualTo(enterpriseAccountCode).andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetId); example.createCriteria().andCodeEqualTo(enterpriseAccountCode).andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetId);
...@@ -92,7 +90,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -92,7 +90,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
* @see pwc.taxtech.atms.service.EnterpriseAccountService# * @see pwc.taxtech.atms.service.EnterpriseAccountService#
* getListByEnterpriseAccountSetId(java.lang.String) * getListByEnterpriseAccountSetId(java.lang.String)
*/ */
@Override
public EnterpriseAccountAndValidateInfo getListByEnterpriseAccountSetId(String enterpriseAccountSetId) { public EnterpriseAccountAndValidateInfo getListByEnterpriseAccountSetId(String enterpriseAccountSetId) {
EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample(); EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample();
...@@ -158,7 +155,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -158,7 +155,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#getEnterpriseAccount(java.lang.String) * @see pwc.taxtech.atms.service.EnterpriseAccountService#getEnterpriseAccount(java.lang.String)
*/ */
@Override
public EnterpriseAccountDto getEnterpriseAccount(String enterpriseAccountId) { public EnterpriseAccountDto getEnterpriseAccount(String enterpriseAccountId) {
EnterpriseAccount enterpriseAccount = enterpriseAccountMapper.selectByPrimaryKey(enterpriseAccountId); EnterpriseAccount enterpriseAccount = enterpriseAccountMapper.selectByPrimaryKey(enterpriseAccountId);
...@@ -195,7 +191,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -195,7 +191,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#addEnterpriseAccount(pwc.taxtech.atms.service.dto.EnterpriseAccountDto) * @see pwc.taxtech.atms.service.EnterpriseAccountService#addEnterpriseAccount(pwc.taxtech.atms.service.dto.EnterpriseAccountDto)
*/ */
@Override
@Transactional @Transactional
public OperationResultDto<List<EnterpriseAccountDto>> addEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto) { public OperationResultDto<List<EnterpriseAccountDto>> addEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto) {
...@@ -257,7 +252,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -257,7 +252,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#updateEnterpriseAccount(pwc.taxtech.atms.service.dto.EnterpriseAccountDto) * @see pwc.taxtech.atms.service.EnterpriseAccountService#updateEnterpriseAccount(pwc.taxtech.atms.service.dto.EnterpriseAccountDto)
*/ */
@Override
@Transactional @Transactional
public OperationResultDto<List<EnterpriseAccountDto>> updateEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto) { public OperationResultDto<List<EnterpriseAccountDto>> updateEnterpriseAccount(EnterpriseAccountDto enterpriseAccountDto) {
...@@ -370,7 +364,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -370,7 +364,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#mapAccountUpdateParent(java.util.List, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean) * @see pwc.taxtech.atms.service.EnterpriseAccountService#mapAccountUpdateParent(java.util.List, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean)
*/ */
@Override
public void mapAccountUpdateParent(List<String> enterpriseAccountCodeList, String enterpriseAccountSetId, public void mapAccountUpdateParent(List<String> enterpriseAccountCodeList, String enterpriseAccountSetId,
String industryId, String orgId, Boolean isToUpdateEvenExists) { String industryId, String orgId, Boolean isToUpdateEvenExists) {
...@@ -500,7 +493,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -500,7 +493,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
* @see pwc.taxtech.atms.service.EnterpriseAccountService#createEnterpriseAccountSetAndimportEnterpriseAccount(java.lang.String, java.lang.String, java.util.List) * @see pwc.taxtech.atms.service.EnterpriseAccountService#createEnterpriseAccountSetAndimportEnterpriseAccount(java.lang.String, java.lang.String, java.util.List)
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@Override
@Transactional @Transactional
public OperationResultDto addEnterpriseAccountSetAndImportData(String enterpriseAccountSetName, public OperationResultDto addEnterpriseAccountSetAndImportData(String enterpriseAccountSetName,
String enterpriseAccountSetCode, List<EnterpriseAccountDto> importData) { String enterpriseAccountSetCode, List<EnterpriseAccountDto> importData) {
...@@ -557,7 +549,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -557,7 +549,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
* @see pwc.taxtech.atms.service.EnterpriseAccountService#repeatImportEnterpriseAccountSet(pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto, java.util.List) * @see pwc.taxtech.atms.service.EnterpriseAccountService#repeatImportEnterpriseAccountSet(pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto, java.util.List)
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@Override
@Transactional @Transactional
public OperationResultDto repeatImportEnterpriseAccountSet(EnterpriseAccountSetDto enterpriseAccountSetDto, public OperationResultDto repeatImportEnterpriseAccountSet(EnterpriseAccountSetDto enterpriseAccountSetDto,
List<EnterpriseAccountDto> importData) { List<EnterpriseAccountDto> importData) {
...@@ -570,7 +561,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -570,7 +561,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
* @see pwc.taxtech.atms.service.EnterpriseAccountService#clearRepeatEnterpriseAccountList(pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto) * @see pwc.taxtech.atms.service.EnterpriseAccountService#clearRepeatEnterpriseAccountList(pwc.taxtech.atms.dto.epaccount.EnterpriseAccountSetDto)
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@Override
public OperationResultDto clearRepeatEnterpriseAccountList(EnterpriseAccountSetDto enterpriseAccountSetDto) { public OperationResultDto clearRepeatEnterpriseAccountList(EnterpriseAccountSetDto enterpriseAccountSetDto) {
EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample(); EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample();
...@@ -629,7 +619,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -629,7 +619,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#getAccountMappingOrg(java.lang.String) * @see pwc.taxtech.atms.service.EnterpriseAccountService#getAccountMappingOrg(java.lang.String)
*/ */
@Override
public List<AccountMappingDto> getAccountMappingOrg(String organizationId) { public List<AccountMappingDto> getAccountMappingOrg(String organizationId) {
AccountMappingExample accountMappingExample = new AccountMappingExample(); AccountMappingExample accountMappingExample = new AccountMappingExample();
...@@ -647,7 +636,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -647,7 +636,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
return accountMappingDtoList; return accountMappingDtoList;
} }
@Override
public List<EnterpriseAccountSetDto> getEnterpriseAccountSetListByOrgId(String orgId) { public List<EnterpriseAccountSetDto> getEnterpriseAccountSetListByOrgId(String orgId) {
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -656,7 +644,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -656,7 +644,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
.map(this::toAccountSetDto).collect(Collectors.toList()); .map(this::toAccountSetDto).collect(Collectors.toList());
} }
@Override
public List<EnterpriseAccountDto> getList(String epAccountSetId, String orgId, String filterType) { public List<EnterpriseAccountDto> getList(String epAccountSetId, String orgId, String filterType) {
if (StringUtils.isAnyBlank(epAccountSetId, orgId)) { if (StringUtils.isAnyBlank(epAccountSetId, orgId)) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -708,7 +695,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -708,7 +695,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
} }
@Transactional @Transactional
@Override
public OperationResultDto autoMap(String orgId, String accountSetId) { public OperationResultDto autoMap(String orgId, String accountSetId) {
//region 基础数据获取 //region 基础数据获取
Optional<EnterpriseAccountSetOrg> optional = epAccountSetOrgDao.getByOrgIdAndAccountSetId(orgId, accountSetId) Optional<EnterpriseAccountSetOrg> optional = epAccountSetOrgDao.getByOrgIdAndAccountSetId(orgId, accountSetId)
...@@ -939,7 +925,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -939,7 +925,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
} }
@Transactional @Transactional
@Override
public OperationResultDto mapAccount(AccountMapDto accountMapDto) { public OperationResultDto mapAccount(AccountMapDto accountMapDto) {
//region 获取相关的机构对象,标准科目对象, 账套对象 //region 获取相关的机构对象,标准科目对象, 账套对象
Organization organization = organizationMapper.selectByPrimaryKey(accountMapDto.getOrgId()); Organization organization = organizationMapper.selectByPrimaryKey(accountMapDto.getOrgId());
...@@ -1033,7 +1018,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -1033,7 +1018,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
return OperationResultDto.success(mapDto); return OperationResultDto.success(mapDto);
} }
@Override
public OperationResultDto clearMap(String[] epAccountIds, String orgId) { public OperationResultDto clearMap(String[] epAccountIds, String orgId) {
if (epAccountIds != null && StringUtils.isNotBlank(orgId)) { if (epAccountIds != null && StringUtils.isNotBlank(orgId)) {
boolean isToClearAllMapping = false; boolean isToClearAllMapping = false;
...@@ -1724,7 +1708,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -1724,7 +1708,6 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
/* (non-Javadoc) /* (non-Javadoc)
* @see pwc.taxtech.atms.service.EnterpriseAccountService#validateImportEnterpriseAccount(java.io.InputStream, java.lang.String) * @see pwc.taxtech.atms.service.EnterpriseAccountService#validateImportEnterpriseAccount(java.io.InputStream, java.lang.String)
*/ */
@Override
public OperationResultDto<List<EnterpriseAccountDto>> validateImportEnterpriseAccount(String filePath) { public OperationResultDto<List<EnterpriseAccountDto>> validateImportEnterpriseAccount(String filePath) {
//validate header //validate header
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment