Commit 2fd1fa9c authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

Dev oracle sherlock

See merge request root/atms!167
parents 6cb74496 c0d2b961
......@@ -42,6 +42,7 @@ import pwc.taxtech.atms.vat.entity.*;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -88,6 +89,12 @@ public class OutputInvoiceServiceImpl {
PageHelper.startPage(queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
List<OutputInvoice> invoices = outputInvoiceMapper.selectByExample(outputInvoiceExample);
DecimalFormat df = new DecimalFormat("#,###.00");
invoices.stream().forEach(x -> {
x.setHJJE(df.format(new BigDecimal(x.getHJJE())));
x.setHJSE(df.format(new BigDecimal(x.getHJSE())));
}
);
PageInfo<OutputInvoice> pageInfo = new PageInfo<>(invoices);
return pageInfo;
}
......
......@@ -7,6 +7,8 @@
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay');
$scope.startMonth = vatSessionService.month;
$scope.endMonth = vatSessionService.month;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
var minDate = [1, vatSessionService.project.year];
var maxDate = [12, vatSessionService.project.year];
......@@ -93,7 +95,16 @@
totalPage: 0,
};
var countTotal = function(){
var totalMoneyAmount = 0;
var totalTaxAmount = 0;
_.each($scope.gridOptions.data, function (x) {
totalMoneyAmount = totalMoneyAmount + parseFloat(x.hjje.replace(/,/g, ""));
totalTaxAmount = totalTaxAmount + parseFloat(x.hjse.replace(/,/g, ""));
})
$scope.totalMoneyAmount = totalMoneyAmount.toLocaleString();
$scope.totalTaxAmount = totalTaxAmount.toLocaleString();
}
vatPreviewService.queryInputInvoiceList($scope.queryParams).success(function (data) {
if (data) {
......@@ -106,6 +117,7 @@
$scope.gridOptions.data = data.list;
$scope.queryIncomeInvoiceItemResult.pageInfo = data;
computeIncomeInvoiceItemPage();
countTotal();
}
});
};
......@@ -564,8 +576,8 @@
{ name: $translate.instant('InvoiceFPHM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>' },
{ name: $translate.instant('InvoiceGHFSH'), width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' },
{ name: $translate.instant('InvoiceFPLX'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)}}</span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass:'toRight', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.hjje}}</span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass:'toRight', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.hjse}}</span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass: 'right', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass: 'right', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>' },
{ name: $translate.instant('InvoiceRZRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>' },
{ name: $translate.instant('InvoiceRZJG'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.certificationResult}}</span></div>' }
],
......
......@@ -15,6 +15,12 @@
<span ng-click="downloadInputInvoice()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
<span class="text-bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;
金额<span class="numAmount">{{totalMoneyAmount}}</span>&nbsp;&nbsp;&nbsp;
税额<span class="numAmount">{{totalTaxAmount}}</span>
</div>
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow">
......@@ -43,9 +49,5 @@
</div>
</div>
</div>
<style>
.toRight{
text-align: right;
}
</style>
</div>
......@@ -4,6 +4,21 @@
background-color: white;
height: 100%;
.numAmount {
padding: 0 3px;
height: 21px;
margin-left: 5px;
/* font-family: 'Arial'; */
font-weight: 600;
border-radius: 2px;
font-style: normal;
outline: none;
border: none;
min-width: 20px;
background-color: #DDDDDD;
color: #AA0000;
}
.top-area-wrapper {
height: 60px;
width: 98%;
......
......@@ -6,6 +6,8 @@
$scope.endDate = new Date(vatSessionService.project.year, 11, 31);
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay');
$scope.curPageItemCount = 0;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
var startMonth = vatSessionService.month;
var endMonth = vatSessionService.month;
var minDate = [1, vatSessionService.project.year];
......@@ -79,6 +81,17 @@
totalPage: 0,
}
var countTotal = function(){
var totalMoneyAmount = 0;
var totalTaxAmount = 0;
_.each($scope.gridOptions.data, function (x) {
totalMoneyAmount = totalMoneyAmount + parseFloat(x.hjje.replace(/,/g, ""));
totalTaxAmount = totalTaxAmount + parseFloat(x.hjse.replace(/,/g, ""));
})
$scope.totalMoneyAmount = totalMoneyAmount.toLocaleString();
$scope.totalTaxAmount = totalTaxAmount.toLocaleString();
}
vatPreviewService.queryOutputInvoiceList($scope.queryParams).success(function (data) {
if (data) {
var index = 1;
......@@ -90,6 +103,7 @@
$scope.gridOptions.data = data.list;
$scope.queryOutputInvoiceResult.pageInfo = data;
computeOutputInvoiceItemPage();
countTotal();
}
}).error(function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
......
......@@ -15,7 +15,11 @@
<span ng-click="doExport()"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
<span class="text-bold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;
金额<span class="numAmount">{{totalMoneyAmount}}</span>&nbsp;&nbsp;&nbsp;
税额<span class="numAmount">{{totalTaxAmount}}</span>
</div>
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<!--<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
<div id="filterDiv" >
......
......@@ -104,6 +104,21 @@
}
}
.numAmount {
padding: 0 3px;
height: 21px;
margin-left: 5px;
/* font-family: 'Arial'; */
font-weight: 600;
border-radius: 2px;
font-style: normal;
outline: none;
border: none;
min-width: 20px;
background-color: #DDDDDD;
color: #AA0000;
}
.input-width-middle {
width: 217px;
}
......
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