Merge branch 'develop'

master
taylor.dang 6 years ago
commit 3ea7ced158

@ -139,16 +139,66 @@
</update>
<select id="listOrders" resultType="com.alibaba.fastjson.JSONObject">
<if test="bd_user != null">
SELECT temp.* FROM (
</if>
<if test="gateway">
<include refid="gateway_keys"/>
</if>
<if test="!gateway">
<include refid="tradelog_list_keys"/>
</if>
FROM pmt_orders o
FROM (
select oo.order_id,oo.client_id,oo.total_amount,oo.display_amount,
oo.customer_payment_amount,oo.coupon_payment_amount,oo.currency,
oo.create_time,oo.confirm_time,oo.status,oo.order_description,oo.order_detail,
oo.client_order_id,oo.gateway,oo.channel,oo.pre_authorization,oo.refund_amount,oo.customer_id
from pmt_orders oo
<where>
<if test="search_text != null">
<bind name="name_pattern" value="'%' + search_text + '%'"/>
<if test="text_type == 'remark'">
AND oo.order_detail LIKE #{name_pattern}
</if>
<if test="text_type == 'channel'">
AND oo.channel = #{search_text}
</if>
<if test="text_type == 'order_id'">
AND oo.order_id = #{search_text}
</if>
</if>
<if test="order_id != null">
AND oo.order_id = #{order_id}
</if>
<if test="trade_type != null">
AND oo.gateway IN
<foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">
#{gateway}
</foreach>
</if>
<if test="from != null">
AND oo.create_time &gt;= #{from}
</if>
<if test="to != null">
AND oo.create_time &lt; #{to}
</if>
<if test="date != null">
AND oo.transaction_date = DATE(#{date})
</if>
<if test="dev_id != null">
AND oo.dev_id = #{dev_id}
</if>
<if test="status != null">
AND
<foreach collection="status" item="std" open="(" close=")" separator=" or ">
oo.status = #{std}
</foreach>
</if>
<if test="channel != null">
AND
<foreach collection="channel" item="chan" open="(" close=")" separator=" or ">
oo.channel = #{chan}
</foreach>
</if>
</where>
) o
INNER JOIN sys_clients p
ON p.client_id = o.client_id
AND p.is_valid = 1
@ -175,7 +225,7 @@
OR o.order_detail LIKE #{name_pattern}
OR t.system_transaction_id = #{search_text}
OR o.channel = #{search_text}
OR t.order_id = #{search_text}
OR o.order_id = #{search_text}
)
</if>
<if test="text_type == 'client_moniker'">
@ -184,27 +234,9 @@
<if test="text_type == 'client_name'">
AND p.short_name LIKE #{name_pattern}
</if>
<if test="text_type == 'remark'">
AND o.order_detail LIKE #{name_pattern}
</if>
<if test="text_type == 'channel'">
AND o.channel = #{search_text}
</if>
<if test="text_type == 'sys_trans_id'">
AND t.system_transaction_id = #{search_text}
</if>
<if test="text_type == 'order_id'">
AND o.order_id = #{search_text}
</if>
</if>
<if test="order_id != null">
AND o.order_id = #{order_id}
</if>
<if test="trade_type != null">
AND o.gateway IN
<foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">
#{gateway}
</foreach>
</if>
<if test="org_id != null and org_ids == null">
AND p.org_id = #{org_id}
@ -215,33 +247,10 @@
#{org_id}
</foreach>
</if>
<if test="from != null">
AND o.create_time &gt;= #{from}
</if>
<if test="to != null">
AND o.create_time &lt; #{to}
</if>
<if test="date != null">
AND DATE(o.create_time) = DATE(#{date})
</if>
<if test="dev_id != null">
AND o.dev_id = #{dev_id}
</if>
<if test="status != null">
AND
<foreach collection="status" item="std" open="(" close=")" separator=" or ">
o.status = #{std}
</foreach>
</if>
<if test="channel != null">
AND
<foreach collection="channel" item="chan" open="(" close=")" separator=" or ">
o.channel = #{chan}
</foreach>
</if>
<if test="bd_group != null">
AND p.client_id IN(
SELECT b.client_id
SELECT distinct b.client_id
FROM sys_client_bd b
INNER JOIN financial_bd_config c
ON c.manager_id = b.bd_id
@ -254,19 +263,19 @@
</if>
)
</if>
</where>
GROUP BY o.order_id, t.refund_id
<if test="bd_user != null">
) temp
INNER JOIN sys_client_bd d
ON temp.client_id = d.client_id
AND d.bd_id = #{bd_user}
AND p.client_id in(select distinct d.client_id
from sys_client_bd d
where d.bd_id = #{bd_user}
AND d.is_valid = 1
AND DATE(d.start_date) &lt;= DATE(now())
AND (d.end_date IS NULL OR DATE(d.end_date) &gt;= DATE(now()))
AND DATE(d.start_date) &lt;= curdate()
AND (d.end_date IS NULL OR DATE(d.end_date) &gt;= curdate()))
</if>
</where>
GROUP BY o.order_id
</select>
<select id="listOrdersNoPage" resultType="com.alibaba.fastjson.JSONObject">
<if test="gateway">
<include refid="gateway_keys"/>
@ -293,7 +302,7 @@
<if test="from!=null">and o.create_time &gt;= #{from}</if>
<if test="to!=null">and o.create_time &lt; #{to}</if>
</where>
GROUP BY o.order_id,t.refund_id
GROUP BY o.order_id
order by o.create_time
</select>
@ -371,7 +380,7 @@
</foreach>
</if>
</where>
GROUP BY o.order_id,t.refund_id
GROUP BY o.order_id
</select>

@ -18,16 +18,6 @@
</ol>
</section>
<div class="content">
<!--<div class="row margin-bottom">
<div class="col-sm-12">
<button class="btn btn-danger" type="button" ui-sref=".rate_warnings">
<i class="fa fa-bell"></i> Rate Expire Warnings
</button>
<button class="btn btn-primary" type="button" ui-sref=".date_setting">
<i class="fa fa-cog"></i> Settlement Date Config
</button>
</div>
</div>-->
<div class="box box-warning">
<div class="box-header">Settlement Dates</div>
<div class="box-body">
@ -39,147 +29,5 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-sm-12">
<div class="form-inline">
<label class="control-label col-sm-2" for="sub-merchant-search">Partner
Code</label>
<div class="col-sm-10">
<input type="text" class="form-control"
id="sub-merchant-search"
ng-model="params.clientMoniker">
</div>
</div>
</div>
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input"
ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseToday()">Today</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterday()">Yesterday</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a>
</div>
<div uib-dropdown ng-if="orgs" class="btn-group">
<button id="single-button" type="button" class="btn btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{showOrg}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu
aria-labelledby="single-button">
<li><a ng-click="chooseOrg('all')">All</a></li>
<li ng-repeat="org in orgs"><a ng-click="chooseOrg(org)">{{org.name}}</a>
</li>
</ul>
</div>
<button class="btn btn-success" type="button"
ng-click="loadClearingLogs()">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title">
<span ng-if="clearing_logs.length">Total | Clearing Amount: {{analysis.total|currency:'AUD '}},
Transfer to Merchant: {{analysis.income|currency:'AUD '}}, Merchant Service Fee: {{analysis.fee|currency:'AUD '}}</span>
</h3>
</div>
<div class="box-body">
<div class="row cen col-sm-12">
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Partner Name</th>
<th>Total Amount</th>
<th>Transfer to Merchant</th>
<th>Merchant Service Fee</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in clearing_logs">
<td ng-bind="log.short_name"></td>
<td ng-bind="log.total|currency:'AUD '"></td>
<td ng-bind="log.income|currency:'AUD '"></td>
<td ng-bind="log.fee|currency:'AUD '"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box-footer" ng-if="clearing_logs.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadClearingLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">清算金额趋势</div>
<div class="box-body">
<div class="chart" echarts="clearingHistory" style="height: 300px"
ng-class="{nodata:clearingHistory.nodata}"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -699,7 +699,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.showFile();
$scope.passClient = function () {
$scope.refreshWechatInstitutionMerchantId();
if ($scope.partner.enable_hf) {
if ($scope.partner.hfindustry == null) {
alert("已开启HF支付通道HF行业不可为空!");
@ -772,7 +771,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
};
$scope.pass2GreenChannel = function () {
$scope.refreshWechatInstitutionMerchantId();
commonDialog.confirm({
title: 'Green Channel Audit Partner',
content: 'Are you sure to mark partner ' + $scope.partner.company_name + ' green channel audited '

Loading…
Cancel
Save