Commit 0fe565df authored by chase's avatar chase

fix bug

parent 09ea917f
......@@ -82,8 +82,9 @@ public class BB extends FunctionBase implements FreeRefFunction {
return cellValue;
}
List<CellTemplatePerGroupDto> cellTemplateDataList;
Project project = null;
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);
if(project == null){
return cellValue;
......@@ -115,9 +116,9 @@ public class BB extends FunctionBase implements FreeRefFunction {
formulaContext.getOrganizationId());
MyAsserts.assertNotEmpty(projectId, Exceptions.PROJECT_EMPTY);
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()),
formulaContext.getProjectId(), bo.getPeriod());
project==null?formulaContext.getProjectId():project.getId(), bo.getPeriod());
nullCellDto.extractFromGroup(bo, curPeriod, cellData, cellTemplateData);
if (cellData.getData() == null && !dss.isEmpty()) {
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