Commit 50f27a31 authored by neo's avatar neo

[DEL] delete std accounts service interface

parent 269461ff
...@@ -4,10 +4,15 @@ import io.swagger.annotations.ApiOperation; ...@@ -4,10 +4,15 @@ import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto; import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto;
import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto; import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto;
import pwc.taxtech.atms.service.StdAccountService; import pwc.taxtech.atms.service.impl.StdAccountServiceImpl;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
...@@ -17,12 +22,12 @@ import java.util.List; ...@@ -17,12 +22,12 @@ import java.util.List;
public class StdAccountController extends BaseController { public class StdAccountController extends BaseController {
@Autowired @Autowired
private StdAccountService stdAccountService; private StdAccountServiceImpl stdAccountService;
@ResponseBody @ResponseBody
@ApiOperation(value = "获取科目层级") @ApiOperation(value = "获取科目层级")
@RequestMapping(value = "stdAccountHierarchy", method = RequestMethod.GET) @RequestMapping(value = "stdAccountHierarchy", method = RequestMethod.GET)
public List<StdAccountFancyTreeDto> getStdAccountHierarchy(@RequestParam(name="orgID") String orgId) { public List<StdAccountFancyTreeDto> getStdAccountHierarchy(@RequestParam(name = "orgID") String orgId) {
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
return Collections.emptyList(); return Collections.emptyList();
} }
...@@ -64,6 +69,6 @@ public class StdAccountController extends BaseController { ...@@ -64,6 +69,6 @@ public class StdAccountController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
logger.error("GetStdAccountByIndustry error.", e); logger.error("GetStdAccountByIndustry error.", e);
} }
return Collections.emptyList(); return Collections.emptyList();
} }
} }
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto;
import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto;
import java.util.List;
public interface StdAccountService {
List<StdAccountFancyTreeDto> getStdAccountHierarchy(String orgId) throws ServiceException;
List<StandardAccountDto> GetStdAccountLinkEtsAccount(String orgId, String accountSetId);
List<StandardAccountDto> getStdAccountByIndustry(String industryId);
}
...@@ -6,19 +6,18 @@ import org.apache.commons.lang3.StringUtils; ...@@ -6,19 +6,18 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.constant.ActiveStatus; import pwc.taxtech.atms.constant.ActiveStatus;
import pwc.taxtech.atms.constant.StandAccountConstant; import pwc.taxtech.atms.constant.StandAccountConstant;
import pwc.taxtech.atms.constant.enums.StdAccountEnum; import pwc.taxtech.atms.constant.enums.StdAccountEnum;
import pwc.taxtech.atms.dao.OrganizationMapper; import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.StandardAccountMapper;
import pwc.taxtech.atms.dao.StandardAccountDao; import pwc.taxtech.atms.dao.StandardAccountDao;
import pwc.taxtech.atms.dao.StandardAccountMapper;
import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto; import pwc.taxtech.atms.dto.stdaccount.StandardAccountDto;
import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto; import pwc.taxtech.atms.dto.stdaccount.StdAccountFancyTreeDto;
import pwc.taxtech.atms.entity.Organization; import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.StandardAccount; import pwc.taxtech.atms.entity.StandardAccount;
import pwc.taxtech.atms.entity.StandardAccountExample; import pwc.taxtech.atms.entity.StandardAccountExample;
import pwc.taxtech.atms.service.StdAccountService; import pwc.taxtech.atms.exception.ServiceException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
...@@ -27,7 +26,7 @@ import java.util.Map; ...@@ -27,7 +26,7 @@ import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
public class StdAccountServiceImpl extends BaseService implements StdAccountService { public class StdAccountServiceImpl extends BaseService {
@Autowired @Autowired
private StandardAccountMapper standardAccountMapper; private StandardAccountMapper standardAccountMapper;
...@@ -37,7 +36,6 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ ...@@ -37,7 +36,6 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ
@Autowired @Autowired
private StandardAccountDao standardAccountDao; private StandardAccountDao standardAccountDao;
@Override
public List<StdAccountFancyTreeDto> getStdAccountHierarchy(String orgId) throws ServiceException { public List<StdAccountFancyTreeDto> getStdAccountHierarchy(String orgId) throws ServiceException {
List<StdAccountFancyTreeDto> resultList; List<StdAccountFancyTreeDto> resultList;
try { try {
...@@ -79,7 +77,6 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ ...@@ -79,7 +77,6 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ
return resultList; return resultList;
} }
@Override
public List<StandardAccountDto> GetStdAccountLinkEtsAccount(String orgId, String accountSetId) { public List<StandardAccountDto> GetStdAccountLinkEtsAccount(String orgId, String accountSetId) {
if (StringUtils.isBlank(orgId)) { if (StringUtils.isBlank(orgId)) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -101,10 +98,9 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ ...@@ -101,10 +98,9 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ
return Collections.emptyList(); return Collections.emptyList();
} }
@Override
public List<StandardAccountDto> getStdAccountByIndustry(String industryId) { public List<StandardAccountDto> getStdAccountByIndustry(String industryId) {
StandardAccountExample example = new StandardAccountExample(); StandardAccountExample example = new StandardAccountExample();
example.createCriteria().andRuleTypeEqualTo((int)StandAccountConstant.TWO).andIsActiveEqualTo(ActiveStatus.Active).andIndustryIdEqualTo(industryId); example.createCriteria().andRuleTypeEqualTo((int) StandAccountConstant.TWO).andIsActiveEqualTo(ActiveStatus.Active).andIndustryIdEqualTo(industryId);
example.setOrderByClause("Code"); example.setOrderByClause("Code");
......
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