Commit 7d5dfc5b authored by neo's avatar neo

[DEL] delete VatAbstractService and push all file down

parent 29731f5b
package pwc.taxtech.atms.vat.service.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.dao.PeriodCellCommentMapper;
import pwc.taxtech.atms.vat.entity.PeriodCellComment;
import pwc.taxtech.atms.vat.entity.PeriodCellCommentExample;
import java.util.List;
import java.util.Optional;
@Service
public class CellCommentServiceImpl extends VatAbstractService {
public class CellCommentServiceImpl {
private final static Logger logger = LoggerFactory.getLogger(CellCommentServiceImpl.class);
@Autowired
public PeriodCellCommentMapper periodCellCommentMapper;
public OperationResultDto<List<PeriodCellComment>> getCellComments(Optional<Long> cellDataId,String projectId) {
OperationResultDto resultDto = new OperationResultDto();
try {
......
......@@ -5,6 +5,7 @@ import org.springframework.stereotype.Component;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dao.FormulaAdminMapper;
import pwc.taxtech.atms.dao.ProjectServiceTypeMapper;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dpo.GroupId;
import pwc.taxtech.atms.entity.ProjectServiceType;
......@@ -12,10 +13,9 @@ import pwc.taxtech.atms.entity.ProjectServiceTypeExample;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.CellDataMapper;
import pwc.taxtech.atms.vat.dao.PeriodCellDataMapper;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.entity.CellData;
import pwc.taxtech.atms.vat.entity.CellDataExample;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodCellDataExample;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import pwc.taxtech.atms.vat.entity.PeriodReportExample;
......@@ -24,15 +24,17 @@ import java.util.List;
import static pwc.taxtech.atms.constant.Constant.FIRST_OR_DEFAULT;
@Component
public class FormulaAgent extends VatAbstractService {
public class FormulaAgent {
@Autowired
public FormulaAdminMapper adminMp;
private FormulaAdminMapper adminMp;
@Autowired
public PeriodReportMapper periodReportMapper;
private PeriodReportMapper periodReportMapper;
@Autowired
public CellDataMapper cellDataMapper;
private CellDataMapper cellDataMapper;
@Autowired
public PeriodCellDataMapper periodCellDataMapper;
private PeriodCellDataMapper periodCellDataMapper;
@Autowired
private ProjectServiceTypeMapper projectServiceTypeMapper;
public List<CellTemplatePerGroupDto> getCellTemplateGroupDto(Long templateGroupId, String projectId) {
ProjectServiceTypeExample pst = new ProjectServiceTypeExample();
......
......@@ -19,7 +19,8 @@ import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.InputInvoice;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.RestResponsePage;
import pwc.taxtech.atms.vat.dao.InputVatInvoiceItemMapper;
import pwc.taxtech.atms.vat.dao.InputVatInvoiceMapper;
import pwc.taxtech.atms.vat.dpo.InputInvoicePreviewQueryParam;
import pwc.taxtech.atms.vat.entity.InputVatInvoice;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceExample;
......@@ -28,19 +29,20 @@ import pwc.taxtech.atms.vat.entity.InputVatInvoiceItemExample;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
@Service
public class InputInvoiceDataImportServiceImpl extends VatAbstractService {
public class InputInvoiceDataImportServiceImpl {
private static final String _tableName = "InputVATInvoice";
private static final String _itemTableName = "InputVATInvoiceItem";
private static final String _validationTableName = "ValidationInfo";
@Autowired
private InputVatInvoiceMapper inputVATInvoiceMapper;
@Autowired
private SqlSessionTemplate dynamicSqlSessionTemplate;
@Autowired
private InputVatInvoiceItemMapper inputVATInvoiceItemMapper;
public PagingResultDto<InputInvoice> getInputInvoiceTreeViewData(InputInvoicePreviewQueryParam paras) {
return get(paras.getInvoiceCode(), paras.getPeriodStart(), paras.getPageInfo().getPageIndex(), paras.getPageInfo().getPageSize());
......
......@@ -22,34 +22,32 @@ import pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.OutputInvoice;
import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.vat.dao.ImportFileMapper;
import pwc.taxtech.atms.vat.dao.OutputVatInvoiceItemMapper;
import pwc.taxtech.atms.vat.dao.OutputVatInvoiceMapper;
import pwc.taxtech.atms.vat.dpo.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.vat.dpo.QueryOutputDto;
import pwc.taxtech.atms.vat.entity.ImportFile;
import pwc.taxtech.atms.vat.entity.ImportFileExample;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceItem;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceItemExample;
import pwc.taxtech.atms.vat.entity.*;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service
public class OutputInvoiceServiceImpl extends VatAbstractService {
public class OutputInvoiceServiceImpl {
@Autowired
private ImportFileMapper importFileMapper;
private static final String _tableName = "OutputVATInvoice";
private static final String _itemTableName = "OutputVATInvoiceItem";
@Autowired
private SqlSessionTemplate dynamicSqlSessionTemplate;
@Autowired
private OutputVatInvoiceMapper outputVATInvoiceMapper;
@Autowired
private OutputVatInvoiceItemMapper outputVATInvoiceItemMapper;
public PagingResultDto<OutputInvoice> queryOutputInvoiceList(QueryOutputDto queryDto) {
return get("", queryDto.getPeriodStart(), queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
......
......@@ -15,6 +15,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.ftp.FtpService;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.CellDataSourceType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
......@@ -22,6 +23,8 @@ import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dto.vatdto.CellCalcInfoDto;
import pwc.taxtech.atms.dto.vatdto.CellTemplateConfigGroupDto;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.report.functions.*;
......@@ -39,14 +42,28 @@ import static pwc.taxtech.atms.common.util.SpringContextUtil.reportMapper;
import static pwc.taxtech.atms.constant.Constant.EMPTY;
@Component
public class ReportGeneratorImpl extends VatAbstractService {
public class ReportGeneratorImpl {
private static final Logger logger = LoggerFactory.getLogger(ReportGeneratorImpl.class);
@Autowired
private ProjectMapper projectMapper;
@Autowired
private FtpService ftpService;
@Autowired
private FormulaAgent formulaAgent;
@Autowired
private PeriodCellDataMapper periodCellDataMapper;
@Autowired
private PeriodFormulaBlockMapper periodFormulaBlockMapper;
@Autowired
private PeriodDataSourceMapper periodDataSourceMapper;
@Autowired
private PeriodCellTemplateConfigMapper periodCellTemplateConfigMapper;
@Autowired
private PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
private PeriodTemplateMapper periodTemplateMapper;
@Autowired
private DistributedIdService distributedIdService;
public String generateData(String projectId, List<Long> templateIds, Boolean ifDeleteManualDataSource,
List<String> exceptCellTemplates, Integer periodParam, Optional<String> generator) {
......
......@@ -3,19 +3,22 @@ package pwc.taxtech.atms.vat.service.impl;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.*;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.NotSupportedException;
import pwc.taxtech.atms.service.impl.CellConfigTranslater;
import pwc.taxtech.atms.vat.dao.PeriodTaxPayerReportRuleMapper;
import pwc.taxtech.atms.vat.dao.PeriodTaxRuleSettingMapper;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
......@@ -29,13 +32,61 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Component
public class ReportServiceImpl extends VatAbstractService {
public class ReportServiceImpl {
private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class);
@Autowired
public ReportGeneratorImpl reportGenerator;
private ReportGeneratorImpl reportGenerator;
@Autowired
private PeriodTaxRuleSettingMapper periodTaxRuleSettingMapper;
@Autowired
private PeriodTaxPayerReportRuleMapper periodTaxPayerReportRuleMapper;
@Autowired
private PeriodEnterpriseAccountMapper periodEnterpriseAccountMapper;
@Autowired
private InputVatInvoiceMapper inputVATInvoiceMapper;
@Autowired
private OutputVatInvoiceMapper outputVATInvoiceMapper;
@Autowired
private CustomsInvoiceMapper customsInvoiceMapper;
@Autowired
private PeriodCellDataSourceMapper periodCellDataSourceMapper;
@Autowired
private KeyValueConfigMapper keyValueConfigMapper;
@Autowired
private PeriodModifiedReportCellMapper periodModifiedReportCellMapper;
@Autowired
private PeriodReportMapper periodReportMapper;
@Autowired
private EnterpriseAccountMapper enterpriseAccountMapper;
@Autowired
private CellTemplateConfigMapper cellTemplateConfigMapper;
@Autowired
private CellTemplateMapper cellTemplateMapper;
@Autowired
private PeriodDataSourceDetailMapper periodDataSourceDetailMapper;
@Autowired
private PeriodDataSourceMapper periodDataSourceMapper;
@Autowired
private PeriodCellDataMapper periodCellDataMapper;
@Autowired
private PeriodFormulaBlockMapper periodFormulaBlockMapper;
@Autowired
private PeriodCellTemplateConfigMapper periodCellTemplateConfigMapper;
@Autowired
private PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
private PeriodTemplateMapper periodTemplateMapper;
@Autowired
private TemplateMapper templateMapper;
@Autowired
private ProjectServiceTypeMapper projectServiceTypeMapper;
@Autowired
private TaxPayerReportRuleMapper taxPayerReportRuleMapper;
@Autowired
private ProjectMapper projectMapper;
@Autowired
private DistributedIdService distributedIdService;
public OperationResultDto<List<ReportDto>> getReportTemplate(String projectId, EnumServiceType serviceType, Integer periodParam) {
int period = periodParam != null ? periodParam : 0;
......@@ -662,7 +713,7 @@ public class ReportServiceImpl extends VatAbstractService {
}
public OperationResultDto<PeriodCellTemplateConfig> getCellTemplateConfig(Long reportTemplateId, Integer periodParam,
int rowIndex, int columnIndex,String projectId) {
int rowIndex, int columnIndex, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
try {
int period = periodParam != null ? periodParam : 0;
......
package pwc.taxtech.atms.vat.service.impl;
import org.slf4j.Logger;
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.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
public class VatAbstractService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
public CompanyBalanceMapper companyBalanceMapper;
@Autowired
public VatEnterpriseAccountMapper vatEnterpriseAccountMapper;
@Autowired
public PeriodStandardAccountMapper periodStandardAccountMapper;
@Autowired
public PeriodEnterpriseAccountMapper periodEnterpriseAccountMapper;
@Autowired
public InputVatInvoiceMapper inputVATInvoiceMapper;
@Autowired
public OutputVatInvoiceMapper outputVATInvoiceMapper;
@Autowired
public CustomsInvoiceMapper customsInvoiceMapper;
@Autowired
public OutputVatInvoiceItemMapper outputVATInvoiceItemMapper;
@Autowired
public InputVatInvoiceItemMapper inputVATInvoiceItemMapper;
@Autowired
public ProjectMapper projectMapper;
@Autowired
public TaxPayerReportRuleMapper taxPayerReportRuleMapper;
@Autowired
public ProjectServiceTypeMapper projectServiceTypeMapper;
@Autowired
public TemplateMapper templateMapper;
@Autowired
public PeriodTemplateMapper periodTemplateMapper;
@Autowired
public PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
public PeriodCellTemplateConfigMapper periodCellTemplateConfigMapper;
// @Autowired
// public DataSourceMapper dataSourceMapper;
@Autowired
public PeriodDataSourceMapper periodDataSourceMapper;
@Autowired
public DataSourceDetailMapper dataSourceDetailMapper;
@Autowired
public PeriodDataSourceDetailMapper periodDataSourceDetailMapper;
@Autowired
public TemplateGroupMapper templateGroupMapper;
@Autowired
public DistributedIdService distributedIdService;
@Autowired
public CellTemplateMapper cellTemplateMapper;
@Autowired
public CellTemplateConfigMapper cellTemplateConfigMapper;
@Autowired
public EnterpriseAccountMapper enterpriseAccountMapper;
@Autowired
public BalanceStdManualMapper balanceStdManualMapper;
@Autowired
public BalanceMapper balanceMapper;
@Autowired
public VatEnterpriseAccountDao vatEnterpriseAccountDao;
@Autowired
public ProjectDao projectDao;
@Autowired
public PeriodFormulaBlockMapper periodFormulaBlockMapper;
@Autowired
public PeriodReportMapper periodReportMapper;
@Autowired
public CellDataMapper cellDataMapper;
@Autowired
public PeriodCellDataMapper periodCellDataMapper;
@Autowired
public PeriodModifiedReportCellMapper periodModifiedReportCellMapper;
@Autowired
public PeriodCellCommentMapper periodCellCommentMapper;
@Autowired
public KeyValueConfigMapper keyValueConfigMapper;
@Autowired
public FtpService ftpService;
@Autowired
public CellDataSourceMapper cellDataSourceMapper;
@Autowired
public PeriodCellDataSourceMapper periodCellDataSourceMapper;
}
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