Merge branch 'master_contract_analysis' into develop

# Conflicts:
#	src/db/modify.sql
#	src/main/ui/manage.html
master
wangning 7 years ago
commit 111073ba77

@ -333,4 +333,7 @@ create_time datetime not null,
operation varchar(50) DEFAULT NULL,
PRIMARY key(`id`)
);
alter table act_app_list MODIFY column is_show_window tinyint(1) DEFAULT 0 COMMENT 'app是否弹框'
alter table act_app_list MODIFY column is_show_window tinyint(1) DEFAULT 0 COMMENT 'app是否弹框'
alter table sys_clients_contract add column confirm_time datetime DEFAULT null comment '合同确认时间';

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.mappers.system;
import java.sql.SQLType;
import java.util.List;
import org.apache.ibatis.annotations.Param;
@ -23,4 +24,7 @@ public interface ClientsContractMapper {
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 java.util.List;
public interface ClientContractService {
JSONObject getOrGenerateSourceAgreement(int client_id,String channel);
@ -12,4 +14,5 @@ public interface ClientContractService {
JSONObject getClientContractExpire(int client_id);
List<JSONObject> list();
}

@ -107,14 +107,15 @@ public class ClientContractServiceImpl implements ClientContractService {
if(contract.getBoolean("has_sign")){
return;
}
Date now = new Date();
JSONObject account = clientAccountMapper.findById(account_id);
contract.put("has_sign", 1);
contract.put("sign_account_id",account_id);
contract.put("sign_channel",channel);
contract.put("confirm_time",now);
contract.put("signatory",account.getString("display_name"));
clientsContractMapper.update(contract);
Date now = new Date();
List<JSONObject> rateInfo = clientRateMapper.minExpiryTime(client_id, null);
if(expire){
rateInfo.forEach((p)->{
@ -214,4 +215,9 @@ public class ClientContractServiceImpl implements ClientContractService {
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();
}
}

@ -338,6 +338,12 @@ margin-bottom: 10%;"/>
<i class="fa fa-users"></i> <span>余额增值活动</span>
</a>
</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 ui-sref-active="active" ng-if="('1000000000000'|withRole)">
<a ui-sref="analysis_agent" ui-sref-opts="{reload:true}">
@ -417,7 +423,6 @@ margin-bottom: 10%;"/>
<i class="fa fa-file-text-o"></i> <span>网站管理|Site Manage</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('10'|withRole)||('1000000'|withRole)||('10000000'|withRole)">
<a href="https://customer.royalpay.com.au/manage/sign_in" target="_blank">
<i class="fa fa-file-text-o"></i> <span>积分商城|Integral Mall</span>

@ -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