Commit 3a73a430 authored by neo's avatar neo

[dev] over write save datasorce for bb use praramer index

parent ed2e5e3b
...@@ -100,7 +100,7 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -100,7 +100,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
} }
bo.disCount(); // bo.disCount();
CellData cellData = null; CellData cellData = null;
String dbName = agent.getPastProjectDbName(curPeriod.getCurYear(), String dbName = agent.getPastProjectDbName(curPeriod.getCurYear(),
...@@ -140,7 +140,7 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -140,7 +140,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
} finally { } finally {
LOGGER.warn("error for bb cacls for {} and current for {}", bo.toString(), curPeriod.toString()); LOGGER.warn("error for bb cacls for {} and current for {}", bo.toString(), curPeriod.toString());
Long dataSourceID = saveDataSource(ec, ds, FormulaDataSourceDetailType.ReportCellDataSourceDto, Long dataSourceID = saveDataSource(ec, ds, FormulaDataSourceDetailType.ReportCellDataSourceDto,
cellValue, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupID()); cellValue, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupID(),bo.getColumnIndex(),bo.getRowIndex()+1);
saveFormulaBlock(formulaContext.getPeriod(), ec, bo.expression(curPeriod.getCurPeriod(), curPeriod.getCurYear()), cellValue, dataSourceID); saveFormulaBlock(formulaContext.getPeriod(), ec, bo.expression(curPeriod.getCurPeriod(), curPeriod.getCurYear()), cellValue, dataSourceID);
} }
} }
......
...@@ -10,10 +10,11 @@ import org.slf4j.LoggerFactory; ...@@ -10,10 +10,11 @@ import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.SpringContextUtil; import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.vat.entity.*; import pwc.taxtech.atms.vat.entity.DataSource;
import pwc.taxtech.atms.vat.entity.DataSourceDetail;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent; import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
import java.lang.reflect.Type;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
...@@ -90,12 +91,17 @@ public class FunctionBase { ...@@ -90,12 +91,17 @@ public class FunctionBase {
} }
} }
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val, int period, Long templateGroupId) {
return saveDataSource(ec, dataSourceList, formulaDataSourceDetailType, val, period, templateGroupId, null, null);
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList, public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val, FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId) { int period, Long templateGroupId, Integer colNumP, Integer rowNumP) {
String reportCode = ec.getWorkbook().getSheetName(ec.getSheetIndex()); String reportCode = ec.getWorkbook().getSheetName(ec.getSheetIndex());
int colNum = ec.getColumnIndex(); int colNum = colNumP == null ? ec.getColumnIndex() : colNumP;
int rowNum = ec.getRowIndex(); int rowNum = rowNumP == null ? ec.getRowIndex() : rowNumP;
//根据这三个值还有period获取 cell_template_Id的值 //根据这三个值还有period获取 cell_template_Id的值
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("code", reportCode); map.put("code", reportCode);
......
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