Commit 0f6af6c2 authored by neo's avatar neo

[DEL] delete dimension service interface

parent 2af32692
...@@ -14,7 +14,7 @@ import pwc.taxtech.atms.dto.dimension.DimensinTypeOrgDto; ...@@ -14,7 +14,7 @@ import pwc.taxtech.atms.dto.dimension.DimensinTypeOrgDto;
import pwc.taxtech.atms.dto.dimension.DimensionDto; import pwc.taxtech.atms.dto.dimension.DimensionDto;
import pwc.taxtech.atms.dto.dimension.DimensionValueDto; import pwc.taxtech.atms.dto.dimension.DimensionValueDto;
import pwc.taxtech.atms.dto.navtree.DevTreeDto; import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.service.DimensionService; import pwc.taxtech.atms.service.impl.DimensionServiceImpl;
import java.util.List; import java.util.List;
...@@ -23,17 +23,19 @@ import java.util.List; ...@@ -23,17 +23,19 @@ import java.util.List;
public class DimensionController { public class DimensionController {
@Autowired @Autowired
private DimensionService dimensionService; private DimensionServiceImpl dimensionService;
@ApiOperation(value = "获取有效纬度、纬度值个数") @ApiOperation(value = "获取有效纬度、纬度值个数")
@RequestMapping(value = "getDimensionStatics", method = RequestMethod.GET) @RequestMapping(value = "getDimensionStatics", method = RequestMethod.GET)
public @ResponseBody List<DimensionDto> getDimensionStatics() { public @ResponseBody
List<DimensionDto> getDimensionStatics() {
return dimensionService.getDimensionStatics(); return dimensionService.getDimensionStatics();
} }
@ApiOperation(value = "获取所有维度值") @ApiOperation(value = "获取所有维度值")
@RequestMapping(value = "getAllDimensionList", method = RequestMethod.GET) @RequestMapping(value = "getAllDimensionList", method = RequestMethod.GET)
public @ResponseBody List<DimensionDto> getAllDimensionList() { public @ResponseBody
List<DimensionDto> getAllDimensionList() {
return dimensionService.getAllDimensionList(); return dimensionService.getAllDimensionList();
} }
......
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.dimension.DimensinTypeOrgDto;
import pwc.taxtech.atms.dto.dimension.DimensionDto;
import pwc.taxtech.atms.dto.dimension.DimensionValueDto;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.entity.Dimension;
public interface DimensionService {
List<DimensionDto> getDimensionStatics();
List<DimensionDto> getAllDimensionList();
List<DimensionDto> getDimensionList();
DimensinTypeOrgDto getDimensionById(String id);
List<Dimension> findByIsActiveTrue();
List<DimensionValueOrgDto> getAllDimensionOrgList();
@SuppressWarnings("rawtypes")
OperationResultDto updateDimension(DimensionDto model);
List<DimensionValueDto> getDimensionValueList(String dimensionId);
@SuppressWarnings("rawtypes")
List<DevTreeDto> getDevDimensionTreeList();
@SuppressWarnings("rawtypes")
OperationResultDto addDimension(DimensionDto model);
@SuppressWarnings("rawtypes")
OperationResultDto addDimensionValue(DimensionValueDto model);
@SuppressWarnings("rawtypes")
OperationResultDto updateDimensionValue(DimensionValueDto model);
List<DimensionValueOrgDto> getAllDimensionOrgListByOrgId(String orgid);
}
...@@ -28,7 +28,6 @@ import pwc.taxtech.atms.dto.dimension.DimensionValueDto; ...@@ -28,7 +28,6 @@ import pwc.taxtech.atms.dto.dimension.DimensionValueDto;
import pwc.taxtech.atms.dto.navtree.DevTreeDto; import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.BusinessUnitService; import pwc.taxtech.atms.service.BusinessUnitService;
import pwc.taxtech.atms.service.DimensionService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
...@@ -46,14 +45,13 @@ import static java.util.stream.Collectors.toList; ...@@ -46,14 +45,13 @@ import static java.util.stream.Collectors.toList;
/** /**
*/ */
@Service @Service
public class DimensionServiceImpl extends AbstractService implements DimensionService { public class DimensionServiceImpl extends AbstractService {
@Autowired @Autowired
private BusinessUnitService businessUnitService; private BusinessUnitService businessUnitService;
@Autowired @Autowired
private StatisticAttributeServiceImpl statisticAttributeService; private StatisticAttributeServiceImpl statisticAttributeService;
@Override
public List<DimensionDto> getDimensionStatics() { public List<DimensionDto> getDimensionStatics() {
DimensionExample example = new DimensionExample(); DimensionExample example = new DimensionExample();
example.setOrderByClause("ORDER_INDEX"); example.setOrderByClause("ORDER_INDEX");
...@@ -144,7 +142,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -144,7 +142,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return (int) businessUnitMapper.countByExample(businessUnitExample); return (int) businessUnitMapper.countByExample(businessUnitExample);
} }
@Override
public List<DimensionDto> getAllDimensionList() { public List<DimensionDto> getAllDimensionList() {
List<Dimension> dimensionList = findByIsActiveTrue(); List<Dimension> dimensionList = findByIsActiveTrue();
...@@ -214,7 +211,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -214,7 +211,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return DimensionTypeEnum.SelfDimension; return DimensionTypeEnum.SelfDimension;
} }
@Override
public List<DimensionDto> getDimensionList() { public List<DimensionDto> getDimensionList() {
DimensionExample example = new DimensionExample(); DimensionExample example = new DimensionExample();
example.setOrderByClause("IS_ACTIVE desc, ORDER_INDEX asc"); example.setOrderByClause("IS_ACTIVE desc, ORDER_INDEX asc");
...@@ -228,7 +224,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -228,7 +224,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
.map(x -> CommonUtils.copyProperties(x, new DimensionDto())).collect(Collectors.toList()); .map(x -> CommonUtils.copyProperties(x, new DimensionDto())).collect(Collectors.toList());
} }
@Override
public DimensinTypeOrgDto getDimensionById(final String id) { public DimensinTypeOrgDto getDimensionById(final String id) {
Assert.hasText(id, "Empty dimensionId"); Assert.hasText(id, "Empty dimensionId");
Dimension record = findByIdAndIsActiveTrue(id); Dimension record = findByIdAndIsActiveTrue(id);
...@@ -251,7 +246,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -251,7 +246,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return dimensionMapper.selectByExample(example).stream().findFirst().orElse(null); return dimensionMapper.selectByExample(example).stream().findFirst().orElse(null);
} }
@Override
public List<Dimension> findByIsActiveTrue() { public List<Dimension> findByIsActiveTrue() {
DimensionExample example = new DimensionExample(); DimensionExample example = new DimensionExample();
example.createCriteria().andIsActiveEqualTo(true); example.createCriteria().andIsActiveEqualTo(true);
...@@ -264,7 +258,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -264,7 +258,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return dimensionMapper.selectByExample(example); return dimensionMapper.selectByExample(example);
} }
@Override
public List<DimensionValueOrgDto> getAllDimensionOrgList() { public List<DimensionValueOrgDto> getAllDimensionOrgList() {
List<Dimension> dimensionList = dimensionMapper.selectByExample(null); List<Dimension> dimensionList = dimensionMapper.selectByExample(null);
List<DimensionValue> dimensionValueList = dimensionValueMapper.selectByExample(null); List<DimensionValue> dimensionValueList = dimensionValueMapper.selectByExample(null);
...@@ -320,7 +313,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -320,7 +313,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@Override
public OperationResultDto updateDimension(DimensionDto model) { public OperationResultDto updateDimension(DimensionDto model) {
Assert.notNull(model, "Null model"); Assert.notNull(model, "Null model");
final String modelName = model.getName(); final String modelName = model.getName();
...@@ -370,7 +362,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -370,7 +362,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
statisticAttributeMapper.updateByExampleSelective(record, example1); statisticAttributeMapper.updateByExampleSelective(record, example1);
} }
@Override
public List<DimensionValueDto> getDimensionValueList(String dimensionId) { public List<DimensionValueDto> getDimensionValueList(String dimensionId) {
Assert.hasText(dimensionId, "Empty dimensionId"); Assert.hasText(dimensionId, "Empty dimensionId");
List<DimensionValueDto> list; List<DimensionValueDto> list;
...@@ -393,7 +384,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -393,7 +384,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
} }
@SuppressWarnings({"unchecked", "rawtypes"}) @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public List<DevTreeDto> getDevDimensionTreeList() { public List<DevTreeDto> getDevDimensionTreeList() {
List<DevTreeDto> devTreeList = new ArrayList<>(); List<DevTreeDto> devTreeList = new ArrayList<>();
List<Dimension> query = findDimensionOrderByIsActiveDescAndOrderIndexAsc(); List<Dimension> query = findDimensionOrderByIsActiveDescAndOrderIndexAsc();
...@@ -420,7 +410,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -420,7 +410,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return devTreeList; return devTreeList;
} }
@Override
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
public OperationResultDto addDimension(DimensionDto model) { public OperationResultDto addDimension(DimensionDto model) {
Assert.notNull(model, "Null model"); Assert.notNull(model, "Null model");
...@@ -504,7 +493,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -504,7 +493,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return dimensionMapper.countByExample(example) > 0; return dimensionMapper.countByExample(example) > 0;
} }
@Override
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public OperationResultDto addDimensionValue(DimensionValueDto model) { public OperationResultDto addDimensionValue(DimensionValueDto model) {
Assert.notNull(model, "Null model"); Assert.notNull(model, "Null model");
...@@ -559,7 +547,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -559,7 +547,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@Override
public OperationResultDto updateDimensionValue(DimensionValueDto model) { public OperationResultDto updateDimensionValue(DimensionValueDto model) {
Assert.notNull(model, "Null model"); Assert.notNull(model, "Null model");
Assert.hasText(model.getName(), "Empty name"); Assert.hasText(model.getName(), "Empty name");
...@@ -605,7 +592,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -605,7 +592,6 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return dimensionValueMapper.countByExample(example) > 0; return dimensionValueMapper.countByExample(example) > 0;
} }
@Override
public List<DimensionValueOrgDto> getAllDimensionOrgListByOrgId(String orgid) { public List<DimensionValueOrgDto> getAllDimensionOrgListByOrgId(String orgid) {
List<Dimension> dimensionList = dimensionMapper.selectByExample(null); List<Dimension> dimensionList = dimensionMapper.selectByExample(null);
List<DimensionValue> dimensionValueList = dimensionValueMapper.selectByExample(null); List<DimensionValue> dimensionValueList = dimensionValueMapper.selectByExample(null);
......
...@@ -57,7 +57,6 @@ import pwc.taxtech.atms.entity.*; ...@@ -57,7 +57,6 @@ import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.OrganizationExample.Criteria; import pwc.taxtech.atms.entity.OrganizationExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.CommonService; import pwc.taxtech.atms.service.CommonService;
import pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.OperationLogService; import pwc.taxtech.atms.service.OperationLogService;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -98,7 +97,7 @@ public class OrganizationServiceImpl { ...@@ -98,7 +97,7 @@ public class OrganizationServiceImpl {
private StatisticAttributeServiceImpl statisticAttributeService; private StatisticAttributeServiceImpl statisticAttributeService;
@Autowired @Autowired
private DimensionService dimensionService; private DimensionServiceImpl dimensionService;
@Autowired @Autowired
private CommonService commonService; private CommonService commonService;
......
...@@ -22,7 +22,6 @@ import pwc.taxtech.atms.entity.StatisticAttributeDimension; ...@@ -22,7 +22,6 @@ import pwc.taxtech.atms.entity.StatisticAttributeDimension;
import pwc.taxtech.atms.entity.StatisticAttributeDimensionExample; import pwc.taxtech.atms.entity.StatisticAttributeDimensionExample;
import pwc.taxtech.atms.entity.StatisticAttributeExample; import pwc.taxtech.atms.entity.StatisticAttributeExample;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.DimensionService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -42,7 +41,7 @@ import static pwc.taxtech.atms.common.CommonUtils.copyProperties; ...@@ -42,7 +41,7 @@ import static pwc.taxtech.atms.common.CommonUtils.copyProperties;
public class StatisticAttributeServiceImpl extends AbstractService { public class StatisticAttributeServiceImpl extends AbstractService {
@Autowired @Autowired
private DimensionService dimensionService; private DimensionServiceImpl dimensionService;
@Autowired @Autowired
private DictionaryServiceImpl dictionaryService; private DictionaryServiceImpl dictionaryService;
......
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