Commit a96a7fcf authored by neo's avatar neo

[DEL] delete report gen service interface

parent 24f00f61
package pwc.taxtech.atms.common;
public class IdKeyNameData {
private String key;
private Object id ;
private String name;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getId() {
return id;
}
public void setId(Object id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -23,9 +23,6 @@ import pwc.taxtech.atms.vat.entity.VatOperationLog;
import java.util.Date;
/**
* @see PwC.Tax.Tech.Atms.WebApi.Controllers.OperationLogController.cs
*/
@RestController
@RequestMapping("/api/v1/operationlog/")
public class OperationLogController {
......
......@@ -3,24 +3,14 @@ package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.CellTemplateReferenceDto;
import pwc.taxtech.atms.dto.vatdto.DataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ManualDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ReportDataDto;
import pwc.taxtech.atms.dto.vatdto.VatEnterpriseAccountResultDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.VatEnterpriseAccount;
import pwc.taxtech.atms.vat.service.ReportService;
import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
import java.util.List;
import java.util.Optional;
......@@ -29,7 +19,7 @@ import java.util.Optional;
@RequestMapping(value = "api/v1/Report")
public class ReportController {
@Autowired
ReportService reportService;
ReportServiceImpl reportService;
@RequestMapping(value = "template/{projectId}/{serviceType}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<List<ReportDto>> getTemplate(@PathVariable String projectId, @PathVariable int serviceType, @PathVariable Integer period) {
......
package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.dto.vatdto.CellCalcInfoDto;
import java.util.List;
import java.util.Optional;
public interface ReportGenerator {
String generateData(String projectId, List<Long> templateIds, Boolean ifDeleteManualDataSource, List<String> exceptCellTemplates,
Integer periodParam, Optional<String> generator);
List<CellCalcInfoDto> getCellCalcInfo(List<Long> templateIdList, Integer periodParam,String projectId);
}
package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.CellTemplateReferenceDto;
import pwc.taxtech.atms.dto.vatdto.DataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ManualDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ReportDataDto;
import pwc.taxtech.atms.dto.vatdto.VatEnterpriseAccountResultDto;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.VatEnterpriseAccount;
import java.util.List;
import java.util.Optional;
public interface ReportService {
OperationResultDto<List<ReportDto>> getReportTemplate(String projectId, EnumServiceType serviceType, Integer period);
OperationResultDto updateConfig(String projectId, Integer period, Boolean ifDeleteManualDataSource, String generator);
OperationResultDto generateData(String projectId, EnumServiceType serviceType, Boolean ifDeleteManualDataSource,
Integer periodParam, Integer reportType, Optional<String> generator);
List<CellTemplateReferenceDto> getTemplateReferences(int period);
OperationResultDto<ReportDataDto> getCellData(Long reportId, String porjectId);
OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period, String projectId);
OperationResultDto<PeriodCellTemplateConfig> getCellTemplateConfig(Long reportTemplateId, Integer periodParam,
int rowIndex, int columnIndex,String porjectId);
OperationResultDto<List<VatEnterpriseAccount>> getStdAccountByIndustry(String industryId,String projectId);
OperationResultDto<List<VatEnterpriseAccountResultDto>> getCellAccountRange(Long reportTemplateId, Integer period, int rowIndex, int columnIndex,String projectId);
/**
* 添加手工数据源方法接口
*
* @param data 数据源数据
* @return 添加结果
*/
OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId);
OperationResultDto<String> addDataSource(DataSourceDto datasource);
OperationResultDto<String> getAllDataItems(Integer dataSourceType);
OperationResultDto addDataSourceItems(DataSourceDto dataSource);
OperationResultDto<String> getDataSourceDetailList(Long datasSourceId);
}
......@@ -7,12 +7,7 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.apache.poi.ss.formula.udf.AggregatingUDFFinder;
import org.apache.poi.ss.formula.udf.DefaultUDFFinder;
import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
......@@ -29,22 +24,13 @@ import pwc.taxtech.atms.dto.vatdto.CellTemplateConfigGroupDto;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.ReportGenerator;
import pwc.taxtech.atms.vat.service.impl.report.functions.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
......@@ -53,7 +39,7 @@ import static pwc.taxtech.atms.common.util.SpringContextUtil.reportMapper;
import static pwc.taxtech.atms.constant.Constant.EMPTY;
@Component
public class ReportGeneratorImpl extends VatAbstractService implements ReportGenerator {
public class ReportGeneratorImpl extends VatAbstractService {
private static final Logger logger = LoggerFactory.getLogger(ReportGeneratorImpl.class);
@Autowired
......@@ -62,7 +48,6 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
@Autowired
private FormulaAgent formulaAgent;
@Override
public String generateData(String projectId, List<Long> templateIds, Boolean ifDeleteManualDataSource,
List<String> exceptCellTemplates, Integer periodParam, Optional<String> generator) {
Date createTime = new Date();
......
......@@ -7,23 +7,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.CellDataSourceType;
import pwc.taxtech.atms.constant.enums.EnumOperationType;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType;
import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.CellCalcInfoDto;
import pwc.taxtech.atms.dto.vatdto.CellDataDto;
import pwc.taxtech.atms.dto.vatdto.CellTemplateReferenceDto;
import pwc.taxtech.atms.dto.vatdto.DataSourceDto;
import pwc.taxtech.atms.dto.vatdto.DataSourceDtoExtend;
import pwc.taxtech.atms.dto.vatdto.ManualDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.ReportDataDto;
import pwc.taxtech.atms.dto.vatdto.VatEnterpriseAccountResultDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.NotSupportedException;
import pwc.taxtech.atms.service.impl.CellConfigTranslater;
......@@ -33,29 +20,23 @@ import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.ReportService;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
import java.math.BigDecimal;
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.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Component
public class ReportServiceImpl extends VatAbstractService implements ReportService {
public class ReportServiceImpl extends VatAbstractService {
@Autowired
public ReportGeneratorImpl reportGenerator;
@Autowired
private PeriodTaxRuleSettingMapper periodTaxRuleSettingMapper;
@Autowired
private PeriodTaxPayerReportRuleMapper periodTaxPayerReportRuleMapper;
@Override
public OperationResultDto<List<ReportDto>> getReportTemplate(String projectId, EnumServiceType serviceType, Integer periodParam) {
int period = periodParam != null ? periodParam : 0;
OperationResultDto<List<ReportDto>> operationResult = new OperationResultDto<>();
......@@ -180,7 +161,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
@Override
public OperationResultDto updateConfig(String projectId, Integer period, Boolean ifDeleteManualDataSource, String generator) {
OperationResultDto result = new OperationResultDto();
try {
......@@ -390,7 +370,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return result;
}
@Override
public OperationResultDto generateData(String projectId, EnumServiceType serviceType, Boolean ifDeleteManualDataSource,
Integer periodParam, Integer reportType, Optional<String> generator) {
OperationResultDto operationResultDto = new OperationResultDto();
......@@ -448,12 +427,10 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return operationResultDto;
}
@Override
public List<CellTemplateReferenceDto> getTemplateReferences(int period) {
return new ArrayList<>();
}
@Override
public OperationResultDto<ReportDataDto> getCellData(Long reportId, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
ReportDataDto dataDto = new ReportDataDto();
......@@ -662,7 +639,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
}
@Override
public OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
try {
......@@ -685,7 +661,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return resultDto;
}
@Override
public OperationResultDto<PeriodCellTemplateConfig> getCellTemplateConfig(Long reportTemplateId, Integer periodParam,
int rowIndex, int columnIndex,String projectId) {
OperationResultDto resultDto = new OperationResultDto();
......@@ -716,7 +691,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
}
@Override
public OperationResultDto<List<VatEnterpriseAccount>> getStdAccountByIndustry(String industryId, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
try {
......@@ -740,7 +714,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
}
@Override
public OperationResultDto<List<VatEnterpriseAccountResultDto>> getCellAccountRange(Long reportTemplateId, Integer periodParam, int rowIndex, int columnIndex, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
......@@ -777,7 +750,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return resultDto;
}
@Override
public OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId) {
OperationResultDto operationResultDto = new OperationResultDto();
......@@ -918,7 +890,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return operationResultDto;
}
@Override
public OperationResultDto<String> addDataSource(DataSourceDto datasourceDto) {
OperationResultDto operationResultDto = new OperationResultDto();
try {
......@@ -966,7 +937,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return operationResultDto;
}
@Override
public OperationResultDto<String> getAllDataItems(Integer dataSourceType) {
OperationResultDto operationResultDto = new OperationResultDto();
try {
......@@ -1003,7 +973,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return operationResultDto;
}
@Override
public OperationResultDto addDataSourceItems(DataSourceDto dataSource) {
OperationResultDto operationResultDto = new OperationResultDto();
......@@ -1060,7 +1029,6 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return operationResultDto;
}
@Override
public OperationResultDto<String> getDataSourceDetailList(Long datasSourceId) {
OperationResultDto<String> operationResultDto = new OperationResultDto<>();
PeriodDataSource dataSource = periodDataSourceMapper.selectByPrimaryKey(datasSourceId);
......
......@@ -5,12 +5,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import pwc.taxtech.atms.common.ftp.FtpService;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dao.EnterpriseAccountMapper;
import pwc.taxtech.atms.dao.ProjectDao;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dao.VatEnterpriseAccountDao;
import pwc.taxtech.atms.vat.service.ReportGenerator;
public class VatAbstractService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
......@@ -66,8 +62,6 @@ public class VatAbstractService {
@Autowired
public EnterpriseAccountMapper enterpriseAccountMapper;
@Autowired
public ReportGenerator reportGenerator;
@Autowired
public BalanceStdManualMapper balanceStdManualMapper;
@Autowired
public BalanceMapper balanceMapper;
......
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