Commit 546c3c49 authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents c4b6852b c709862e
......@@ -41,7 +41,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
if(!(args[5] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + ","
......@@ -103,7 +103,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) {
......@@ -138,7 +138,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) {
......@@ -173,7 +173,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) {
......
......@@ -41,7 +41,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
segment5 = getStringParam(args[4], ec);//利润中心代码
}
String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){
if(!(args[5] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码
}
......@@ -102,7 +102,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) {
......@@ -136,7 +136,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) {
......@@ -170,7 +170,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5);
}
if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6);
c1.andSegment6EqualTo(segment6);
}
List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) {
......
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.commons.collections.CollectionUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
......@@ -7,13 +8,11 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.TaxCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import java.math.BigDecimal;
......@@ -57,7 +56,10 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
//根据目标列+名称定位数据行,再根据参数列+数据行定位sheet单元格
cellTemplateDataList = agent.getCellTemplateByNameAndIndex(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), bo.getRowColumnIndex()-1,bo.getRowName(), bo.getColumnIndex() - 1, formulaContext.getPeriod());
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
// MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
if(CollectionUtils.isEmpty(cellTemplateDataList)){
return cellValue;
}
cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex()-1,
......
......@@ -8,17 +8,14 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPTYPEParasBo;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class WPTYPE extends FunctionBase implements FreeRefFunction {
......@@ -61,7 +58,10 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
cellTemplateDataList = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), ec.getRowIndex(), ec.getColumnIndex(), formulaContext.getPeriod());
}
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
// MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
if(CollectionUtils.isEmpty(cellTemplateDataList)){
return cellValue;
}
for (CellTemplatePerGroupDto cellTemplateData : cellTemplateDataList) {
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
BigDecimal curCellVal = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex() - 1,
......
......@@ -850,5 +850,7 @@
"TBEBITForm":"TB EBIT Form",
"ClickEnsureTip": "Click Ensure Button!",
"ConditionColumnNum": "Search Condition Column Num",
"Condition": "Search Condition",
"RevenueTypeConfiguration":"Revenue Type Config"
}
......@@ -909,6 +909,7 @@
"true": "是",
"false": "否",
"ConditionColumnNum": "条件列",
"Condition": "查询条件",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
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