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