Commit 3d24912b authored by sherlock's avatar sherlock

dffs\jffs

parent 474bea32
......@@ -56,7 +56,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
year = year + yearOffset;
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
if(type == 1){
if(type == 0){
EnterpriseAccountSetOrgExample example = new EnterpriseAccountSetOrgExample();
example.createCriteria().andEffectiveDateLessThanOrEqualTo(DateUtils.getNow()).andExpiredDateGreaterThanOrEqualTo(DateUtils.getNow()).andOrganizationIdEqualTo(orgId);
List<EnterpriseAccountSetOrg> enterpriseAccountSetOrgs = SpringContextUtil.enterpriseAccountSetOrgMapper.selectByExample(example);
......@@ -64,7 +64,8 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return NumberEval.ZERO;
}
AccountMappingExample accountMappingExample = new AccountMappingExample();
accountMappingExample.createCriteria().andOrganizationIdEqualTo(orgId).andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetOrgs.get(0).getEnterpriseAccountSetId());
accountMappingExample.createCriteria().andOrganizationIdEqualTo(orgId).andEnterpriseAccountSetIdEqualTo(
enterpriseAccountSetOrgs.get(0).getEnterpriseAccountSetId()).andStandardAccountCodeEqualTo(code);
List<AccountMapping> accountMappings = SpringContextUtil.accountMappingMapper.selectByExample(accountMappingExample);
double result = 0;
......@@ -77,7 +78,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result);
} else if(type == 0){
} else if(type == 1){
double result = count(code, dataSource, period, year);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
......
......@@ -52,7 +52,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
year = year + yearOffset;
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
if(type == 1){
if(type == 0){
EnterpriseAccountSetOrgExample example = new EnterpriseAccountSetOrgExample();
example.createCriteria().andEffectiveDateLessThanOrEqualTo(DateUtils.getNow()).andExpiredDateGreaterThanOrEqualTo(DateUtils.getNow()).andOrganizationIdEqualTo(orgId);
List<EnterpriseAccountSetOrg> enterpriseAccountSetOrgs = SpringContextUtil.enterpriseAccountSetOrgMapper.selectByExample(example);
......@@ -60,7 +60,10 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
return NumberEval.ZERO;
}
AccountMappingExample accountMappingExample = new AccountMappingExample();
accountMappingExample.createCriteria().andOrganizationIdEqualTo(orgId).andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetOrgs.get(0).getEnterpriseAccountSetId());
accountMappingExample.createCriteria().andOrganizationIdEqualTo(orgId)
.andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetOrgs.get(0).getEnterpriseAccountSetId())
.andStandardAccountCodeEqualTo(code);
List<AccountMapping> accountMappings = SpringContextUtil.accountMappingMapper.selectByExample(accountMappingExample);
double result = 0;
......@@ -73,7 +76,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result);
} else if(type == 0){
} else if(type == 1){
double result = count(code, dataSource, period, year);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
......
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