Commit 5cd7ea54 authored by frank.xa.zhang's avatar frank.xa.zhang

add report validation function code fixed bug --frank

parent 70f45dc3
...@@ -598,13 +598,13 @@ public class ReportGeneratorImpl { ...@@ -598,13 +598,13 @@ public class ReportGeneratorImpl {
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext) new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext), , new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new SUM(formulaContext), new KPSR(formulaContext)}; new SUM2(formulaContext), new RSUMIF(formulaContext), new SUM(formulaContext), new KPSR(formulaContext),new TBM(formulaContext)};
} else { } else {
functionImpls = new FreeRefFunction[]{new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext), functionImpls = new FreeRefFunction[]{new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new pwc.taxtech.atms.vat.service.impl.report.functions.validation.BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext) new pwc.taxtech.atms.vat.service.impl.report.functions.validation.BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext), , new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new SUM(formulaContext), new KPSR(formulaContext)}; new SUM2(formulaContext), new RSUMIF(formulaContext), new SUM(formulaContext), new KPSR(formulaContext),new TBM(formulaContext)};
} }
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls); UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs); UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
......
...@@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper; ...@@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import javassist.expr.NewArray;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap; import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -15,15 +14,12 @@ import org.apache.poi.ss.usermodel.*; ...@@ -15,15 +14,12 @@ import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator; import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.nutz.mvc.view.HttpServerResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.analysis.entity.AnalysisActualTaxReturn;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil; import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.message.ErrorMessage; import pwc.taxtech.atms.common.message.ErrorMessage;
...@@ -35,7 +31,10 @@ import pwc.taxtech.atms.constant.Constant; ...@@ -35,7 +31,10 @@ import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*; import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dao.*; import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.ReportDto; import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.*; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PeriodReportDto;
import pwc.taxtech.atms.dto.ReportAttachDto;
import pwc.taxtech.atms.dto.RequestParameterDto;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam; import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult; import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import pwc.taxtech.atms.dto.vatdto.*; import pwc.taxtech.atms.dto.vatdto.*;
...@@ -987,7 +986,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -987,7 +986,7 @@ public class ReportServiceImpl extends BaseService {
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
evaluator.evaluateAll(); evaluator.evaluateAll();
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob); reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
//===============================================start validation compute========================================================== //===============================================start validation compute===========================================================================================================
//todo: 1.get the data from workbook, then put the data into new workbook //todo: 1.get the data from workbook, then put the data into new workbook
Workbook workbook4Validate = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob); Workbook workbook4Validate = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob);
copyDataToWorkbook4Validate(workbook, workbook4Validate); copyDataToWorkbook4Validate(workbook, workbook4Validate);
...@@ -1039,7 +1038,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -1039,7 +1038,7 @@ public class ReportServiceImpl extends BaseService {
periodCellDataMapper.updateByPrimaryKey(cellData.get()); periodCellDataMapper.updateByPrimaryKey(cellData.get());
} }
}); });
//===============================================end validation compute============================================================== //===============================================end validation compute============================================================================================================
setStatus(genJob, STATUS_END); setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob); periodJobMapper.updateByPrimaryKey(genJob);
} catch (Exception e) { } catch (Exception e) {
......
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