Commit 06845d50 authored by neo's avatar neo

[DEL] delete statistic attribute service interface

parent 50f27a31
package pwc.taxtech.atms.controller; package pwc.taxtech.atms.controller;
import java.util.List; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -9,30 +8,32 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -9,30 +8,32 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto; import pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.StatisticAttributeDto; import pwc.taxtech.atms.dto.StatisticAttributeDto;
import pwc.taxtech.atms.service.StatisticAttributeService; import pwc.taxtech.atms.service.impl.StatisticAttributeServiceImpl;
import java.util.List;
@RestController @RestController
@RequestMapping("/api/v1/statisticAttribute/") @RequestMapping("/api/v1/statisticAttribute/")
public class StatisticAttributeController { public class StatisticAttributeController {
@Autowired @Autowired
private StatisticAttributeService statisticAttributeService; private StatisticAttributeServiceImpl statisticAttributeService;
@ApiOperation(value = "显示自定义显示字段") @ApiOperation(value = "显示自定义显示字段")
@RequestMapping(value = "getByParentDimensionID", method = RequestMethod.GET) @RequestMapping(value = "getByParentDimensionID", method = RequestMethod.GET)
public @ResponseBody List<StatisticAttributeDisplayDto> getDimensionStatics( public @ResponseBody
List<StatisticAttributeDisplayDto> getDimensionStatics(
@RequestParam("parentDimensionID") String parentDimensionId) { @RequestParam("parentDimensionID") String parentDimensionId) {
return statisticAttributeService.getStatisticAttributeListByDimensionId(parentDimensionId, null); return statisticAttributeService.getStatisticAttributeListByDimensionId(parentDimensionId, null);
} }
@ApiOperation(value = "自定义显示字段下拉框") @ApiOperation(value = "自定义显示字段下拉框")
@RequestMapping(value = "get", method = RequestMethod.GET) @RequestMapping(value = "get", method = RequestMethod.GET)
public @ResponseBody List<StatisticAttributeDto> getStatisticAttributeList( public @ResponseBody
List<StatisticAttributeDto> getStatisticAttributeList(
@RequestParam("dictionaryCode") String dictionaryCode) { @RequestParam("dictionaryCode") String dictionaryCode) {
return statisticAttributeService.getStatisticAttributeList(dictionaryCode); return statisticAttributeService.getStatisticAttributeList(dictionaryCode);
} }
...@@ -47,7 +48,8 @@ public class StatisticAttributeController { ...@@ -47,7 +48,8 @@ public class StatisticAttributeController {
@ApiOperation(value = "机构管理/卡片/机构/点击自定义显示内容按钮") @ApiOperation(value = "机构管理/卡片/机构/点击自定义显示内容按钮")
@RequestMapping(value = "getOrgSubChildrenStatAttributeList", method = RequestMethod.GET) @RequestMapping(value = "getOrgSubChildrenStatAttributeList", method = RequestMethod.GET)
public @ResponseBody List<StatisticAttributeDisplayDto> getOrgSubChildrenStatAttributeList( public @ResponseBody
List<StatisticAttributeDisplayDto> getOrgSubChildrenStatAttributeList(
@RequestParam("parentDimensionId") String parentDimensionId) { @RequestParam("parentDimensionId") String parentDimensionId) {
return statisticAttributeService.getOrgSubChildrenStatAttributeList(parentDimensionId); return statisticAttributeService.getOrgSubChildrenStatAttributeList(parentDimensionId);
} }
......
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.StatisticAttributeDto;
public interface StatisticAttributeService {
List<StatisticAttributeDisplayDto> getStatisticAttributeListByDimensionId(String parentDimensionId,
List<StatisticAttributeDisplayDto> rawAttrList);
@SuppressWarnings("rawtypes")
OperationResultDto updateStatisticAttribute(List<StatisticAttributeDisplayDto> attributeList);
List<StatisticAttributeDto> getStatisticAttributeList(String dictionaryCode);
List<StatisticAttributeDisplayDto> getOrgSubChildrenStatAttributeList(String parentDimensionId);
}
...@@ -29,7 +29,6 @@ import pwc.taxtech.atms.dto.navtree.DevTreeDto; ...@@ -29,7 +29,6 @@ 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 pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.StatisticAttributeService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
...@@ -52,7 +51,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -52,7 +51,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
@Autowired @Autowired
private BusinessUnitService businessUnitService; private BusinessUnitService businessUnitService;
@Autowired @Autowired
private StatisticAttributeService statisticAttributeService; private StatisticAttributeServiceImpl statisticAttributeService;
@Override @Override
public List<DimensionDto> getDimensionStatics() { public List<DimensionDto> getDimensionStatics() {
...@@ -164,7 +163,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -164,7 +163,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
dimensionDto.setDimensionType(dimensionTypeEnum.value()); dimensionDto.setDimensionType(dimensionTypeEnum.value());
} }
} }
return resultList.stream().filter(x->!Strings.equals(x.getId(),DimensionConstant.OrgSubChildrenId)).collect(Collectors.toList()); return resultList.stream().filter(x -> !Strings.equals(x.getId(), DimensionConstant.OrgSubChildrenId)).collect(Collectors.toList());
} }
private List<DimensionValue> findDimensionValueByDimensionIdAndIsActiveTrue(String dimensionId) { private List<DimensionValue> findDimensionValueByDimensionIdAndIsActiveTrue(String dimensionId) {
...@@ -393,7 +392,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -393,7 +392,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
return list; return list;
} }
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings({"unchecked", "rawtypes"})
@Override @Override
public List<DevTreeDto> getDevDimensionTreeList() { public List<DevTreeDto> getDevDimensionTreeList() {
List<DevTreeDto> devTreeList = new ArrayList<>(); List<DevTreeDto> devTreeList = new ArrayList<>();
...@@ -422,7 +421,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe ...@@ -422,7 +421,7 @@ public class DimensionServiceImpl extends AbstractService implements DimensionSe
} }
@Override @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");
Assert.hasText(model.getName(), "Empty name"); Assert.hasText(model.getName(), "Empty name");
......
...@@ -61,7 +61,6 @@ import pwc.taxtech.atms.service.DimensionService; ...@@ -61,7 +61,6 @@ import pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.OperationLogService; import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.OrganizationService; import pwc.taxtech.atms.service.OrganizationService;
import pwc.taxtech.atms.service.RoleService; import pwc.taxtech.atms.service.RoleService;
import pwc.taxtech.atms.service.StatisticAttributeService;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -98,7 +97,7 @@ public class OrganizationServiceImpl implements OrganizationService { ...@@ -98,7 +97,7 @@ public class OrganizationServiceImpl implements OrganizationService {
private IndustryMapper industryMapper; private IndustryMapper industryMapper;
@Autowired @Autowired
private StatisticAttributeService statisticAttributeService; private StatisticAttributeServiceImpl statisticAttributeService;
@Autowired @Autowired
private DimensionService dimensionService; private DimensionService dimensionService;
......
...@@ -23,7 +23,6 @@ import pwc.taxtech.atms.entity.StatisticAttributeDimensionExample; ...@@ -23,7 +23,6 @@ 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 pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.StatisticAttributeService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -40,14 +39,13 @@ import static pwc.taxtech.atms.common.CommonUtils.copyProperties; ...@@ -40,14 +39,13 @@ import static pwc.taxtech.atms.common.CommonUtils.copyProperties;
/** /**
*/ */
@Service @Service
public class StatisticAttributeServiceImpl extends AbstractService implements StatisticAttributeService { public class StatisticAttributeServiceImpl extends AbstractService {
@Autowired @Autowired
private DimensionService dimensionService; private DimensionService dimensionService;
@Autowired @Autowired
private DictionaryServiceImpl dictionaryService; private DictionaryServiceImpl dictionaryService;
@Override
public List<StatisticAttributeDisplayDto> getStatisticAttributeListByDimensionId(String parentDimensionId, public List<StatisticAttributeDisplayDto> getStatisticAttributeListByDimensionId(String parentDimensionId,
List<StatisticAttributeDisplayDto> rawAttrList) { List<StatisticAttributeDisplayDto> rawAttrList) {
// parentDimensionId = "c61a5bd6-a996-4952-9869-d053995237e5"; // parentDimensionId = "c61a5bd6-a996-4952-9869-d053995237e5";
...@@ -115,7 +113,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St ...@@ -115,7 +113,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St
return result; return result;
} }
@Override
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public OperationResultDto updateStatisticAttribute(List<StatisticAttributeDisplayDto> modelList) { public OperationResultDto updateStatisticAttribute(List<StatisticAttributeDisplayDto> modelList) {
if (!Lang.isEmpty(modelList)) { if (!Lang.isEmpty(modelList)) {
...@@ -190,7 +187,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St ...@@ -190,7 +187,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St
operationLogService.addOperationLogList(logList); operationLogService.addOperationLogList(logList);
} }
@Override
public List<StatisticAttributeDto> getStatisticAttributeList(String dictionaryCode) { public List<StatisticAttributeDto> getStatisticAttributeList(String dictionaryCode) {
StatisticAttributeExample example = new StatisticAttributeExample(); StatisticAttributeExample example = new StatisticAttributeExample();
example.createCriteria().andIsActiveEqualTo(true); example.createCriteria().andIsActiveEqualTo(true);
...@@ -213,7 +209,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St ...@@ -213,7 +209,6 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St
return list; return list;
} }
@Override
public List<StatisticAttributeDisplayDto> getOrgSubChildrenStatAttributeList(String parentDimensionId) { public List<StatisticAttributeDisplayDto> getOrgSubChildrenStatAttributeList(String parentDimensionId) {
List<StatisticAttributeDisplayDto> query = myStatisticAttributeMapper List<StatisticAttributeDisplayDto> query = myStatisticAttributeMapper
.selectByParentDimensionId(parentDimensionId); .selectByParentDimensionId(parentDimensionId);
......
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