Merge branch 'hotfix20180102settlereportyearselect' into develop

master
yixian 7 years ago
commit 13e8a44b80

@ -388,7 +388,7 @@ public class RetailAppServiceImp implements RetailAppService {
query.setGateway_app("11"); query.setGateway_app("11");
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");
DeviceRegister register = deviceSupport.findRegister(clientType); DeviceRegister register = deviceSupport.findRegister(clientType);
Assert.notNull(register); Assert.notNull(register,"Device is not registered");
int client_id = device.getIntValue("client_id"); int client_id = device.getIntValue("client_id");
JSONObject client = clientManager.getClientInfo(client_id); JSONObject client = clientManager.getClientInfo(client_id);
String timezone = client.getString("timezone"); String timezone = client.getString("timezone");
@ -779,7 +779,7 @@ public class RetailAppServiceImp implements RetailAppService {
Date now = new Date(); Date now = new Date();
JSONObject res = merchantInfoProvider.clientCurrentRate(clientId, now, "Wechat"); JSONObject res = merchantInfoProvider.clientCurrentRate(clientId, now, "Wechat");
JSONObject client = clientManager.getClientInfo(clientId); JSONObject client = clientManager.getClientInfo(clientId);
Assert.notNull(client); Assert.notNull(client,"Client is null");
JSONObject[] channels = new JSONObject[3]; JSONObject[] channels = new JSONObject[3];
@ -804,7 +804,7 @@ public class RetailAppServiceImp implements RetailAppService {
Date now = new Date(); Date now = new Date();
JSONObject res = merchantInfoProvider.clientCurrentRate(clientId, now, "Wechat"); JSONObject res = merchantInfoProvider.clientCurrentRate(clientId, now, "Wechat");
JSONObject client = clientManager.getClientInfo(clientId); JSONObject client = clientManager.getClientInfo(clientId);
Assert.notNull(client); Assert.notNull(client,"Client is null");
ArrayList<JSONObject> channels = new ArrayList<>(); ArrayList<JSONObject> channels = new ArrayList<>();
if (client.getBigDecimal("customer_surcharge_rate") != null) { if (client.getBigDecimal("customer_surcharge_rate") != null) {
@ -1095,7 +1095,7 @@ public class RetailAppServiceImp implements RetailAppService {
if (params.getString("type").equals("Merchant")) { if (params.getString("type").equals("Merchant")) {
for (String partner_code : codes) { for (String partner_code : codes) {
JSONObject client = clientManager.getClientInfoByMoniker(partner_code); JSONObject client = clientManager.getClientInfoByMoniker(partner_code);
Assert.notNull(client); Assert.notNull(client,"Client is null");
List<JSONObject> tokens = clientDeviceTokenMapper.listTokensByClient_id(client.getInteger("client_id")); List<JSONObject> tokens = clientDeviceTokenMapper.listTokensByClient_id(client.getInteger("client_id"));
if (null != tokens && tokens.size() > 0) { if (null != tokens && tokens.size() > 0) {
for (final JSONObject devToken : tokens) { for (final JSONObject devToken : tokens) {

@ -13,6 +13,7 @@ define(['angular', 'decimal','uiRouter','./report/analysis-report'], function (a
}]); }]);
app.controller('settleFinancialReportCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) { app.controller('settleFinancialReportCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {
$scope.params = {year: new Date().getFullYear()}; $scope.params = {year: new Date().getFullYear()};
$scope.availableYears = [new Date().getFullYear() - 1, new Date().getFullYear()];
$scope.initMonth = function (year) { $scope.initMonth = function (year) {
$scope.months = []; $scope.months = [];
for (var i = 1; i < 13; i++) { for (var i = 1; i < 13; i++) {

@ -1,7 +1,14 @@
<section class="content"> <section class="content">
<div class="box box-default"> <div class="box box-default">
<div class="box-header" ng-bind="params.year"></div> <div class="box-header">
<div uib-dropdown>
<button class="btn btn-primary" uib-dropdown-toggle type="button" ng-bind="params.year"></button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
<li ng-repeat="year in availableYears" role="menuitem"><a role="button" ng-click="params.year=year" ng-bind="year"></a></li>
</ul>
</div>
</div>
<div class="box-body"> <div class="box-body">
<div class="row"> <div class="row">
<div class="col-xs-3" ng-repeat="mon in months"> <div class="col-xs-3" ng-repeat="mon in months">

Loading…
Cancel
Save