Commit 0fe565df authored by chase's avatar chase

fix bug

parent 09ea917f
...@@ -82,8 +82,9 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -82,8 +82,9 @@ public class BB extends FunctionBase implements FreeRefFunction {
return cellValue; return cellValue;
} }
List<CellTemplatePerGroupDto> cellTemplateDataList; List<CellTemplatePerGroupDto> cellTemplateDataList;
Project project = null;
if (curPeriod.getCurYear() != formulaContext.getYear()) { if (curPeriod.getCurYear() != formulaContext.getYear()) {
Project project = agent.getFixedProject(formulaContext.getProjectId(), curPeriod.getCurYear()); project = agent.getFixedProject(formulaContext.getProjectId(), curPeriod.getCurYear());
// MyAsserts.assertNotNull(project, Exceptions.PROJECT_NOT_FOUND); // MyAsserts.assertNotNull(project, Exceptions.PROJECT_NOT_FOUND);
if(project == null){ if(project == null){
return cellValue; return cellValue;
...@@ -115,9 +116,9 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -115,9 +116,9 @@ public class BB extends FunctionBase implements FreeRefFunction {
formulaContext.getOrganizationId()); formulaContext.getOrganizationId());
MyAsserts.assertNotEmpty(projectId, Exceptions.PROJECT_EMPTY); MyAsserts.assertNotEmpty(projectId, Exceptions.PROJECT_EMPTY);
cellData = agent.getCellData(cellTemplateData.getReportTemplateId(), cellData = agent.getCellData(cellTemplateData.getReportTemplateId(),
cellTemplateData.getCellTemplateId(), curPeriod.getCurPeriod(), formulaContext.getProjectId()); cellTemplateData.getCellTemplateId(), curPeriod.getCurPeriod(), project==null?formulaContext.getProjectId():project.getId());
List<PeriodDataSource> dss = agent.queryManualDataSource(Long.parseLong(cellTemplateData.getCellTemplateId()), List<PeriodDataSource> dss = agent.queryManualDataSource(Long.parseLong(cellTemplateData.getCellTemplateId()),
formulaContext.getProjectId(), bo.getPeriod()); project==null?formulaContext.getProjectId():project.getId(), bo.getPeriod());
nullCellDto.extractFromGroup(bo, curPeriod, cellData, cellTemplateData); nullCellDto.extractFromGroup(bo, curPeriod, cellData, cellTemplateData);
if (cellData.getData() == null && !dss.isEmpty()) { if (cellData.getData() == null && !dss.isEmpty()) {
cellValue = dss.get(0).getAmount(); cellValue = dss.get(0).getAmount();
......
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