Commit 53bc8a3d authored by neo's avatar neo

[DEL] delete key value config service interface

parent 799bb62a
......@@ -23,7 +23,7 @@ import pwc.taxtech.atms.dto.KeyValueConfigDisplayDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateKeyValueConfigDto;
import pwc.taxtech.atms.dto.formula.FormulaConfigDto;
import pwc.taxtech.atms.service.KeyValueConfigService;
import pwc.taxtech.atms.service.impl.KeyValueConfigServiceImpl;
import pwc.taxtech.atms.service.impl.TemplateFormulaServiceImpl;
import java.util.List;
......@@ -34,7 +34,7 @@ public class KeyValueConfigController {
private static final Logger logger = LoggerFactory.getLogger(EnterpriseAccountManagerController.class);
@Autowired
private KeyValueConfigService keyValueConfigService;
private KeyValueConfigServiceImpl keyValueConfigService;
@Autowired
private TemplateFormulaServiceImpl templateFormulaService;
......
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dpo.AnalyticsModelDetail;
import pwc.taxtech.atms.dpo.FinancialStatementDetail;
import pwc.taxtech.atms.dpo.TaxReturnDetail;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.formula.FormulaConfigDto;
public interface KeyValueConfigService {
List<KeyValueConfigDisplayDto> get();
OperationResultDto<List<FormulaConfigDto>> getAllFormulaList();
List<FinancialStatementDetail> getFinacialStatement(String configurationId);
List<TaxReturnDetail> getTaxReturn(String configurationId);
List<AnalyticsModelDetail> getAnalyticsModel(String configurationId);
int deleteKeyValueConfiguration(String keyId);
void addKeyValueConfiguration(AddKeyValueConfigDto addKeyValueConfigDto);
void updateKeyValueConfiguration(UpdateKeyValueConfigDto updateKeyValueConfigDto);
boolean isKeyValueDuplicated(String name);
List<KeyValueConfigDisplayDto> getByOrgId(String orgId);
}
package pwc.taxtech.atms.service.impl;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.druid.util.StringUtils;
import org.apache.poi.openxml4j.exceptions.InvalidOperationException;
import org.nutz.lang.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import com.alibaba.druid.util.StringUtils;
import pwc.taxtech.atms.common.ApplyScope;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.OperateLogType;
......@@ -19,19 +14,29 @@ import pwc.taxtech.atms.constant.enums.KeyValueConfigType;
import pwc.taxtech.atms.dpo.AnalyticsModelDetail;
import pwc.taxtech.atms.dpo.FinancialStatementDetail;
import pwc.taxtech.atms.dpo.TaxReturnDetail;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.AddKeyValueConfigDto;
import pwc.taxtech.atms.dto.KeyValueConfigDisplayDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateKeyValueConfigDto;
import pwc.taxtech.atms.dto.formula.FormulaConfigDto;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.KeyValueConfigService;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
@Service
public class KeyValueConfigServiceImpl extends AbstractService implements KeyValueConfigService {
public class KeyValueConfigServiceImpl extends AbstractService {
private static final Logger logger = LoggerFactory.getLogger(KeyValueConfigServiceImpl.class);
private OperateLogType logType = OperateLogType.OperationLogKeyvalue;
@Override
public List<KeyValueConfigDisplayDto> get() {
List<KeyValueConfig> list = keyValueConfigMapper.selectKeyValueConfigsByOrderByCreateTime();
List<KeyValueConfigDisplayDto> result = new ArrayList<>();
......@@ -65,7 +70,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return result;
}
@Override
public OperationResultDto<List<FormulaConfigDto>> getAllFormulaList() {
OperationResultDto<List<FormulaConfigDto>> result = new OperationResultDto<>();
List<FormulaConfig> dbItems = formulaConfigMapper.selectByExample(new FormulaConfigExample());
......@@ -76,7 +80,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return result;
}
@Override
public List<FinancialStatementDetail> getFinacialStatement(String configurationId) {
Map<String, String> jointObjectMap = new HashMap<>();
industryMapper.selectByExample(new IndustryExample()).forEach(a -> jointObjectMap.put(a.getId(), a.getName()));
......@@ -87,7 +90,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return referenceFinance;
}
@Override
public List<TaxReturnDetail> getTaxReturn(String configurationId) {
Map<String, String> jointObjectMap = new HashMap<>();
industryMapper.selectByExample(new IndustryExample()).forEach(a -> jointObjectMap.put(a.getId(), a.getName()));
......@@ -98,7 +100,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return referenceTax;
}
@Override
public List<AnalyticsModelDetail> getAnalyticsModel(String configurationId) {
Map<String, String> industryList = new HashMap<>();
industryMapper.selectByExample(new IndustryExample()).forEach(a -> industryList.put(a.getId(), a.getName()));
......@@ -112,7 +113,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return referenceModel;
}
@Override
public int deleteKeyValueConfiguration(String keyId) {
KeyValueReferenceExample example = new KeyValueReferenceExample();
example.createCriteria().andKeyValueConfigIdEqualTo(keyId);
......@@ -133,7 +133,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return referenceCount;
}
@Override
public void addKeyValueConfiguration(AddKeyValueConfigDto addKeyValueConfigDto) {
Date now = new Date();
KeyValueConfig keyValueConfig = new KeyValueConfig();
......@@ -155,7 +154,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
, Message.Log.AddKeyValueConfiguration, "", keyValueConfig.getName(), logType);
}
@Override
public void updateKeyValueConfiguration(UpdateKeyValueConfigDto updateKeyValueConfigDto) {
KeyValueConfig keyValueConfig = keyValueConfigMapper.selectByPrimaryKey(updateKeyValueConfigDto.getId());
......@@ -179,7 +177,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
, keyValueConfig.getName(), "Operation content", logType);
}
@Override
public boolean isKeyValueDuplicated(String name) {
KeyValueConfigExample example = new KeyValueConfigExample();
example.createCriteria().andNameEqualTo(name);
......@@ -187,7 +184,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return keyValueConfig.isPresent();
}
@Override
public List<KeyValueConfigDisplayDto> getByOrgId(String orgId) {
Organization organization = organizationMapper.selectByPrimaryKey(orgId);
if (organization == null) {
......
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