Commit 44ad4bf0 authored by neo's avatar neo

[DEL] delete organization service interface

parent 0a050f4a
......@@ -25,7 +25,7 @@ import pwc.taxtech.atms.dto.organization.DimensionRoleDto;
import pwc.taxtech.atms.dto.organization.OrgDto;
import pwc.taxtech.atms.dto.organization.OrgGeneralInfoDto;
import pwc.taxtech.atms.dto.organization.UpdateOrgDimensionDto;
import pwc.taxtech.atms.service.OrganizationService;
import pwc.taxtech.atms.service.impl.OrganizationServiceImpl;
import pwc.taxtech.atms.service.impl.UserRoleServiceImpl;
import pwc.taxtech.atms.service.impl.UserServiceImpl;
......@@ -38,7 +38,7 @@ public class OrganizationController {
private static Logger logger = LoggerFactory.getLogger(OrganizationController.class);
@Autowired
OrganizationService organizationService;
OrganizationServiceImpl organizationService;
@Autowired
UserRoleServiceImpl userRoleService;
@Autowired
......
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dto.AreaOrganizationStatistics;
import pwc.taxtech.atms.dto.IndustryDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.OrganizationValidateDto;
import pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard;
import pwc.taxtech.atms.dto.dimension.OrgDashboardParams;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.dto.organization.OrgCustomDto;
import pwc.taxtech.atms.dto.organization.OrgDto;
import pwc.taxtech.atms.dto.organization.OrgGeneralInfoDto;
import pwc.taxtech.atms.entity.Area;
import pwc.taxtech.atms.entity.Organization;
public interface OrganizationService {
boolean isOrganizationStructureExists(String organizationStructureId);
/**
* Get area linked organizations
*
* @param List<Area>
* areaList
* @return List<Organization>
*/
List<Organization> getLinkedOrganization(List<Area> areaList);
List<NavTreeDto> getOrgListToJson(Integer useType);
/**
* 获取根据机构筛选的属性和机构名称
*
* @return List<OrganizationDto>
*/
List<OrganizationDto> getOrganizationFilterList();
List<Organization> findAllOrganizations();
List<OrganizationDto> getOrgList(Integer useType);
List<IndustryDto> getProjectIndustryList();
List<OrgBasicDto> getOrgListLevel();
Boolean taxPayerNumberUniqueValidate(OrganizationValidateDto validateDto);
List<DimensionOrgDtoDashboard> getOrgDashboard(String parentDimensionId, String parentOrgId,
OrgDashboardParams param);
List<DimensionValueOrgDto> getDimensionValueOrgDtoList();
List<OrganizationDto> getOrganizationListByAreaId(String areaId, String attributeId);
AreaOrganizationStatistics getAreaStatistics();
OrgDto getOrgCustomDashbord(String dimensionValueId, String parentDimensionId, String attributeId);
OrgCustomDto getDimensionValueName(String dimensionId, String dimensionValueId);
@SuppressWarnings("rawtypes")
OperationResultDto disableOrgs(List<String> orgIds);
@SuppressWarnings("rawtypes")
OperationResultDto enableOrgs(String orgId);
@SuppressWarnings("rawtypes")
OperationResultDto updateOrgToDimension(String dimensionValueId, String parentDimensionId,
List<OrgBasicDto> orgList);
OrganizationDto getSingleOrgByOrgId(String orgId);
Boolean codeUniqueValidate(OrganizationValidateDto validateDto);
OperationResultDto<Object> addOrg(OrganizationDto orgDto);
OperationResultDto<Object> updateOrg(OrganizationDto orgDto);
OrgGeneralInfoDto getGeneralInfo(String orgId);
List<DevTreeDto> getOrgIvhTreeList(Integer useType,String orgSetId);
}
package pwc.taxtech.atms.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils;
......@@ -30,9 +23,14 @@ import pwc.taxtech.atms.entity.Area;
import pwc.taxtech.atms.entity.AreaExample;
import pwc.taxtech.atms.entity.AreaExample.Criteria;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.AreaService;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class AreaServiceImpl implements AreaService {
......@@ -40,7 +38,7 @@ public class AreaServiceImpl implements AreaService {
@Autowired
private AreaMapper areaMapper;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
@Autowired
private OperationLogService operationLogService;
@Autowired
......
package pwc.taxtech.atms.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils;
......@@ -27,9 +21,13 @@ import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.entity.BusinessUnit;
import pwc.taxtech.atms.entity.BusinessUnitExample;
import pwc.taxtech.atms.entity.BusinessUnitExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.BusinessUnitService;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*/
......@@ -45,7 +43,7 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
private OperationLogService operationLogService;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
@Autowired
private AuthUserHelper authUserHelper;
......
......@@ -59,7 +59,6 @@ import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.CommonService;
import pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
......@@ -87,7 +86,7 @@ import static pwc.taxtech.atms.common.message.LogMessage.AddOrganization;
* @author rzhou038
*/
@Service
public class OrganizationServiceImpl implements OrganizationService {
public class OrganizationServiceImpl {
@Autowired
private OrganizationMapper organizationMapper;
......@@ -173,7 +172,6 @@ public class OrganizationServiceImpl implements OrganizationService {
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
@Override
public boolean isOrganizationStructureExists(String organizationStructureId) {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andStructureIdEqualTo(organizationStructureId);
......@@ -187,7 +185,6 @@ public class OrganizationServiceImpl implements OrganizationService {
* pwc.taxtech.atms.service.OrganizationService#getLinkedOrganization(java.util.
* List)
*/
@Override
public List<Organization> getLinkedOrganization(List<Area> areaList) {
List<String> areaIdList = areaList.stream().map(area -> area.getId()).collect(Collectors.toList());
......@@ -200,7 +197,6 @@ public class OrganizationServiceImpl implements OrganizationService {
return organizationList;
}
@Override
public List<NavTreeDto> getOrgListToJson(Integer useType) {
List<OrganizationDto> orgList = getOrgList(useType);
return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList());
......@@ -215,7 +211,6 @@ public class OrganizationServiceImpl implements OrganizationService {
return navTreeDto;
}
@Override
public List<OrganizationDto> getOrgList(Integer useType) {
List<OrganizationDto> orgDtoList = new ArrayList<>();
List<Organization> orgList = findAllOrganizations();
......@@ -282,7 +277,6 @@ public class OrganizationServiceImpl implements OrganizationService {
*
* @see pwc.taxtech.atms.service.OrganizationService#GetOrganizationFilterList()
*/
@Override
public List<OrganizationDto> getOrganizationFilterList() {
OrganizationExample example = new OrganizationExample();
......@@ -304,13 +298,11 @@ public class OrganizationServiceImpl implements OrganizationService {
return organizationDtoList;
}
@Override
public List<Organization> findAllOrganizations() {
OrganizationExample organizationExample = new OrganizationExample();
return organizationMapper.selectByExample(organizationExample);
}
@Override
public List<IndustryDto> getProjectIndustryList() {
logger.debug("获取Project Industrys Start");
IndustryExample example = new IndustryExample();
......@@ -335,7 +327,6 @@ public class OrganizationServiceImpl implements OrganizationService {
.findFirst().orElse(null);
}
@Override
public List<OrgBasicDto> getOrgListLevel() {
return organizationMapper.selectIndBusiunitAreaOrgstrctReg(false);
}
......@@ -351,7 +342,6 @@ public class OrganizationServiceImpl implements OrganizationService {
return getOrganizationJoinResult(true);
}
@Override
public Boolean taxPayerNumberUniqueValidate(OrganizationValidateDto validateDto) {
String innerId = Strings.sBlank(validateDto.getId()).trim();
String innerNumber = Strings.sBlank(validateDto.getValue()).trim();
......@@ -367,7 +357,6 @@ public class OrganizationServiceImpl implements OrganizationService {
/**
* 自定义维度显示属性,在机构管理顶部点击某个维度的时候,显示下面维度的属性,Orgchart结构树(Jack)
*/
@Override
public List<DimensionOrgDtoDashboard> getOrgDashboard(String parentDimensionId, String parentOrgId,
OrgDashboardParams param) {
List<String> expandedOrgList = (param == null ? null : param.getExpandedOrgList());
......@@ -944,7 +933,6 @@ public class OrganizationServiceImpl implements OrganizationService {
});
}
@Override
public List<DimensionValueOrgDto> getDimensionValueOrgDtoList() {
return organizationMapper.getDimensionValueOrgDtoList();
}
......@@ -1105,7 +1093,6 @@ public class OrganizationServiceImpl implements OrganizationService {
// return orgDto;
// }
@Override
public List<OrganizationDto> getOrganizationListByAreaId(String areaId, String attributeId) {
List<AreaRegionDto> provinceRegionList = areaRegionMapper
......@@ -1141,7 +1128,6 @@ public class OrganizationServiceImpl implements OrganizationService {
return orgList;
}
@Override
public AreaOrganizationStatistics getAreaStatistics() {
AreaExample example = new AreaExample();
example.createCriteria().andIsActiveEqualTo(true);
......@@ -1280,7 +1266,6 @@ public class OrganizationServiceImpl implements OrganizationService {
/**
*/
@Override
public OrgDto getOrgCustomDashbord(final String dimensionValueId, final String parentDimensionId,
final String attributeId) {
Assert.hasText(parentDimensionId, "Empty parentDimensionId");
......@@ -1744,7 +1729,6 @@ public class OrganizationServiceImpl implements OrganizationService {
/**
* 获取维度的名称,维度值的名称
*/
@Override
public OrgCustomDto getDimensionValueName(String dimensionId, String dimensionValueId) {
OrgCustomDto customDto = new OrgCustomDto();
DimensinTypeOrgDto dimensionDto = dimensionService.getDimensionById(dimensionId);
......@@ -1774,7 +1758,6 @@ public class OrganizationServiceImpl implements OrganizationService {
}
@SuppressWarnings({"rawtypes", "deprecation"})
@Override
public OperationResultDto disableOrgs(List<String> orgIds) {
try {
List<OperationLogDto> logList = new ArrayList<>();
......@@ -1807,7 +1790,6 @@ public class OrganizationServiceImpl implements OrganizationService {
}
@SuppressWarnings({"rawtypes"})
@Override
public OperationResultDto enableOrgs(String orgId) {
Organization curOrg = orgId != null ? organizationMapper.selectByPrimaryKey(orgId) : null;
if (curOrg == null) {
......@@ -1832,7 +1814,6 @@ public class OrganizationServiceImpl implements OrganizationService {
}
}
@Override
public OrganizationDto getSingleOrgByOrgId(String orgId) {
OrganizationDto result = organizationMapper.getSingleOrgByOrgIdToOrgDto(orgId).stream().findFirst()
.orElse(null);
......@@ -1872,7 +1853,6 @@ public class OrganizationServiceImpl implements OrganizationService {
return result;
}
@Override
public Boolean codeUniqueValidate(OrganizationValidateDto validateDto) {
String innerId = Strings.isBlank(validateDto.getId()) ? "" : validateDto.getId().trim();
String innerCode = Strings.isBlank(validateDto.getValue()) ? "" : validateDto.getValue().trim();
......@@ -1881,7 +1861,6 @@ public class OrganizationServiceImpl implements OrganizationService {
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public OperationResultDto<Object> addOrg(OrganizationDto orgDto) {
try {
OperationResultDto result = checkExist(orgDto);
......@@ -2122,7 +2101,6 @@ public class OrganizationServiceImpl implements OrganizationService {
}
@SuppressWarnings("rawtypes")
@Override
public OperationResultDto updateOrgToDimension(String dimensionValueId, String parentDimensionId,
List<OrgBasicDto> orgList) {
if (orgList == null || dimensionValueId == null || parentDimensionId == null) {
......@@ -2251,7 +2229,6 @@ public class OrganizationServiceImpl implements OrganizationService {
* update a org info
*/
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public OperationResultDto<Object> updateOrg(OrganizationDto orgDto) {
try {
Assert.notNull(orgDto, "orgDto Null Exception on updateOrg");
......@@ -2800,12 +2777,10 @@ public class OrganizationServiceImpl implements OrganizationService {
return retList;
}
@Override
public OrgGeneralInfoDto getGeneralInfo(String orgId) {
return getOrgGeneralInfo(orgId);
}
@Override
public List<DevTreeDto> getOrgIvhTreeList(Integer useType, String orgSetId) {
//todo
List<DevTreeDto> result = Lists.newArrayList();
......
......@@ -22,7 +22,6 @@ import pwc.taxtech.atms.entity.OrganizationStructure;
import pwc.taxtech.atms.entity.OrganizationStructureExample;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.Date;
......@@ -40,7 +39,7 @@ public class OrganizationStructureServiceImpl {
private OperationLogService operationLogService;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
@Autowired
private AuthUserHelper authUserHelper;
......
......@@ -38,7 +38,6 @@ import pwc.taxtech.atms.dto.role.UpdateRoleInfo;
import pwc.taxtech.atms.dto.user.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.UserRoleExample.Criteria;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.Date;
......@@ -63,7 +62,7 @@ public class RoleServiceImpl extends AbstractService {
private UserRoleServiceImpl userRoleService;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
public List<NavTreeDto> getRoleTreeList() {
logger.debug("RoleServiceImpl getRoleTreeList");
......
......@@ -44,7 +44,6 @@ import pwc.taxtech.atms.dto.user.UserRoleQueryDto;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.UserRoleExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -60,7 +59,7 @@ public class UserRoleServiceImpl extends AbstractService {
private PermissionServiceImpl permissionService;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
@Autowired
private UserServiceImpl userService;
......
......@@ -56,7 +56,6 @@ import pwc.taxtech.atms.security.JwtUtil;
import pwc.taxtech.atms.security.LdapAuthenticationProvider;
import pwc.taxtech.atms.service.MenuService;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService;
import java.util.ArrayList;
import java.util.Date;
......@@ -100,7 +99,7 @@ public class UserServiceImpl extends AbstractService {
@Autowired
private OperationLogService operationLogService;
@Autowired
private OrganizationService organizationService;
private OrganizationServiceImpl organizationService;
@Autowired
private UserRoleServiceImpl userRoleService;
......
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