Commit bcb8d858 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

Dev oracle sherlock

See merge request root/atms!205
parents e02c2c8c 3d24912b
......@@ -11,6 +11,7 @@ import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
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.ReportCellDataSourceDto;
import pwc.taxtech.atms.entity.AccountMapping;
......@@ -63,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;
......@@ -113,6 +115,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType( FormulaDataSourceType.TrialBalanceSource.getCode());
contain.add(dto);
}
return temp.stream().mapToDouble(a -> a.getPtdCr().doubleValue()).sum();
......
......@@ -10,6 +10,7 @@ import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.entity.AccountMapping;
import pwc.taxtech.atms.entity.AccountMappingExample;
......@@ -59,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;
......@@ -109,6 +113,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType( FormulaDataSourceType.TrialBalanceSource.getCode());
contain.add(dto);
}
return temp.stream().mapToDouble(a -> a.getPtdDr().doubleValue()).sum();
......
......@@ -157,19 +157,37 @@
if (isExportOnly !== null && isExportOnly) {
$scope.exportDataList = newTree;
_.each($scope.exportDataList, function(exportData){
if(exportData.begDebitBal && parseFloat(exportData.begDebitBal.replace(/,/g, "")).toString() != "NaN")
if(exportData.begDebitBal && parseFloat(exportData.begDebitBal.replace(/,/g, "")).toString() != "NaN") {
$scope.totalBegDebitBal += parseFloat(exportData.begDebitBal.replace(/,/g, ""));
if(exportData.begCreditBal && parseFloat(exportData.begCreditBal.replace(/,/g, "")).toString() != "NaN")
exportData.begDebitBal = parseFloat(exportData.begDebitBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
if(exportData.begCreditBal && parseFloat(exportData.begCreditBal.replace(/,/g, "")).toString() != "NaN"){
$scope.totalBegCreditBal += parseFloat(exportData.begCreditBal.replace(/,/g, ""));
if(exportData.debitBal && parseFloat(exportData.debitBal.replace(/,/g, "")).toString() != "NaN")
exportData.begCreditBal = parseFloat(exportData.begCreditBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
if(exportData.debitBal && parseFloat(exportData.debitBal.replace(/,/g, "")).toString() != "NaN"){
$scope.totalDebitBal += parseFloat(exportData.debitBal.replace(/,/g, ""));
if(exportData.creditBal && parseFloat(exportData.creditBal.replace(/,/g, "")).toString() != "NaN")
exportData.debitBal = parseFloat(exportData.debitBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
if(exportData.creditBal && parseFloat(exportData.creditBal.replace(/,/g, "")).toString() != "NaN") {
$scope.totalCreditBal += parseFloat(exportData.creditBal.replace(/,/g, ""));
if(exportData.endDebitBal && parseFloat(exportData.endDebitBal.replace(/,/g, "")).toString() != "NaN")
exportData.creditBal = parseFloat(exportData.creditBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
if(exportData.endDebitBal && parseFloat(exportData.endDebitBal.replace(/,/g, "")).toString() != "NaN") {
$scope.totalEndDebitBal += parseFloat(exportData.endDebitBal.replace(/,/g, ""));
if(exportData.endCreditBal && parseFloat(exportData.endCreditBal.replace(/,/g, "")).toString() != "NaN")
exportData.endDebitBal = parseFloat(exportData.endDebitBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
if(exportData.endCreditBal && parseFloat(exportData.endCreditBal.replace(/,/g, "")).toString() != "NaN") {
$scope.totalEndCreditBal += parseFloat(exportData.endCreditBal.replace(/,/g, ""));
})
exportData.endCreditBal = parseFloat(exportData.endCreditBal.replace(/,/g, "")).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
});
$scope.totalEndCreditBal = $scope.totalEndCreditBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalEndDebitBal = $scope.totalEndDebitBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalCreditBal = $scope.totalCreditBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalDebitBal = $scope.totalDebitBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalBegCreditBal = $scope.totalBegCreditBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalBegDebitBal = $scope.totalBegDebitBal.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
else {
$scope.gridOptions.data = newTree;
......
......@@ -101,12 +101,12 @@
<tr ng-repeat="exportData in exportDataList" on-finish-render="ngRepeatFinished">
<td>{{exportData.acctCode}}</td>
<td>{{exportData.accountName}}</td>
<td>{{exportData.begDebitBal}}</td>
<td>{{exportData.begCreditBal}}</td>
<td>{{exportData.debitBal}}</td>
<td>{{exportData.creditBal}}</td>
<td>{{exportData.endDebitBal}}</td>
<td>{{exportData.endCreditBal}}</td>
<td style="text-align:right;">{{exportData.begDebitBal}}</td>
<td style="text-align:right;">{{exportData.begCreditBal}}</td>
<td style="text-align:right;">{{exportData.debitBal}}</td>
<td style="text-align:right;">{{exportData.creditBal}}</td>
<td style="text-align:right;">{{exportData.endDebitBal}}</td>
<td style="text-align:right;">{{exportData.endCreditBal}}</td>
</tr>
<tr>
<td></td>
......
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