add contract analysis webview

master
wangning 7 years ago
parent 7c760fe803
commit f48ccb5325

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.mappers.system; package au.com.royalpay.payment.manage.mappers.system;
import java.sql.SQLType;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -23,4 +24,7 @@ public interface ClientsContractMapper {
JSONObject findByClientId(@Param("client_id") int clientId); JSONObject findByClientId(@Param("client_id") int clientId);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> list();
} }

@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.system.core;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.List;
public interface ClientContractService { public interface ClientContractService {
JSONObject getOrGenerateSourceAgreement(int client_id,String channel); JSONObject getOrGenerateSourceAgreement(int client_id,String channel);
@ -12,4 +14,5 @@ public interface ClientContractService {
JSONObject getClientContractExpire(int client_id); JSONObject getClientContractExpire(int client_id);
List<JSONObject> list();
} }

@ -186,4 +186,9 @@ public class ClientContractServiceImpl implements ClientContractService {
return result; return result;
} }
@Override
public List<JSONObject> list() {
return clientsContractMapper.list();
}
} }

@ -0,0 +1,26 @@
package au.com.royalpay.payment.manage.system.web;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import javax.annotation.Resource;
@RestController
@RequestMapping(value = "/manage/contract")
public class contractController {
@Resource
private ClientContractService clientContractService;
@ManagerMapping(value = "/list",method = RequestMethod.GET)
public List<JSONObject> list(){
return clientContractService.list();
}
}

@ -328,6 +328,12 @@ margin-bottom: 10%;"/>
<i class="fa fa-users"></i> <span>周末费率减半活动</span> <i class="fa fa-users"></i> <span>周末费率减半活动</span>
</a> </a>
</li> </li>
<li ui-sref-active="active" ng-if="('1000000000000'|withRole)">
<a ui-sref="contract">
<i class="fa fa-money"></i> <span>合同签约情况</span>
</a>
</li>
<li class="header nav-header" ng-if="('1000000000000'|withRole)">机构|Agent</li> <li class="header nav-header" ng-if="('1000000000000'|withRole)">机构|Agent</li>
<li ui-sref-active="active" ng-if="('1000000000000'|withRole)"> <li ui-sref-active="active" ng-if="('1000000000000'|withRole)">
<a ui-sref="analysis_agent" ui-sref-opts="{reload:true}"> <a ui-sref="analysis_agent" ui-sref-opts="{reload:true}">

@ -0,0 +1,23 @@
/**
* Created by yishuqian on 01/06/2017.
*/
define(['angular'], function (angular) {
'use strict';
var app = angular.module('contractApp', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('contract', {
url: '/contract',
templateUrl: '/static/sys/templates/contract_sign.html',
controller: 'contractAnalysisCtrl'
})
}]);
app.controller('contractAnalysisCtrl', ['$scope', '$http', '$state', '$filter', 'commonDialog', function ($scope, $http, $state, $filter, commonDialog) {
$scope.getContractAnalysis = function () {
$http.get('/manage/contract/list').then(function (resp) {
$scope.contract_analysis = resp.data;
});
};
$scope.getContractAnalysis();
}]);
return app;
});

@ -0,0 +1,70 @@
<div class="modal-header">Contract</div>
<div class="modal-body">
<div class="box box-danger">
<div class="box-header">费率已过期商户({{warning.no_rate.length}}家)</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Channel</th>
<th>BD</th>
<th>Latest Rate</th>
<th>Expire Date</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="contract in contract_analysis">
<td>
<a ui-sref="partners.detail.rates({clientMoniker:client.client_moniker})" ng-bind="client.client_moniker"></a>
</td>
<td ng-bind="contract.client_id"></td>
<td ng-bind="contract.create_time|date:'dd/MMM/yyyy'"></td>
<td ng-bind="contract.has_sign"></td>
<td ng-bind="contract.sign_channel"></td>
<td ng-bind="contract.signatory"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box box-warning">
<div class="box-header">费率即将过期商户({{warning.rate_warning.length}}家)</div>
<div class="box-body table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Channel</th>
<th>BD</th>
<th>Rate</th>
<th>Expire Date</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in warning.rate_warning">
<td>
<a ui-sref="partners.detail.rates({clientMoniker:client.client_moniker})" ng-bind="client.client_moniker"></a>
</td>
<td ng-bind="client.short_name"></td>
<td ng-bind="client.rate_name"></td>
<td ng-bind="client.bd_user_name"></td>
<td ng-bind="client.rate_value"></td>
<td ng-bind="client.expiry_time|date:'dd/MMM/yyyy'"></td>
<td>
<button class="btn btn-primary" ng-if="client.generatable" type="button" ng-click="generateRate(client)">
<i class="fa fa-cogs"></i> 根据浮动费率生成
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-danger" ng-click="$dismiss()">Close</button>
</div>
Loading…
Cancel
Save