fix Estimate

master
luoyang 6 years ago
parent b4da9ca173
commit 589977b2d8

@ -231,13 +231,20 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
Date datefrom = cal.getTime();
if (DateUtils.addDays(new Date(), -1).getDate() == datefrom.getDate()) {
if (new Date().getDate() == datefrom.getDate()) {
JSONObject params = new JSONObject();
params.put("datefrom", DateFormatUtils.format(datefrom, "yyyy-MM-dd HH:mm:ss"));
params.put("dateto", DateFormatUtils.format(DateUtils.addDays(datefrom, 1),"yyyy-MM-dd HH:mm:ss"));
List<JSONObject> lastDayClearingAmount = transactionMapper.getLastDaytransAmount(params);
BigDecimal total_clearing = BigDecimal.ZERO;
BigDecimal total_surcharge = BigDecimal.ZERO;
for (JSONObject e : lastDayClearingAmount) {
total_clearing = total_clearing.add(e.getBigDecimal("clearing_amount"));
total_surcharge = total_surcharge.add(e.getBigDecimal("channel_surcharge"));
}
dayInfo.put("total_clearing", total_clearing.subtract(total_surcharge));
dayInfo.put("clearing", lastDayClearingAmount);
}
return dayInfo;

@ -36,6 +36,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
$scope.refresh = function () {
$http.put('/analysis/estimate/future/refresh').then(function (resp) {
$scope.listEsitimate();
$scope.future_loading = true;
});
}

@ -110,37 +110,41 @@
<div class="box-body">
<div ng-repeat="clearing in fut.clearing">
<p class="text-bold col-sm-12" align="left"
ng-if="clearing.channe=='Wechat'"><img
ng-if="clearing.channel=='Wechat'"><img
src="/static/images/wechatpay_sign.png"
/>到账金额:<a
class="text-green"
ng-bind="(clearing.clearing_amount - clearing.channel_surcharge)|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="clearing.channe=='Alipay'"><img
ng-if="clearing.channel=='Alipay'"><img
src="/static/images/alipay_sign.png"
/>到账金额:<a
class="text-green"
ng-bind="(clearing.clearing_amount - clearing.channel_surcharge)|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="clearing.channe=='AlipayOnline'"><img
ng-if="clearing.channel=='AlipayOnline'"><img
src="/static/images/alipay_sign.png"
/>Alipay Online到账金额:<a
class="text-green"
ng-bind="(clearing.clearing_amount - clearing.channel_surcharge)|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="clearing.channe=='hf'"><img
ng-if="clearing.channel=='hf'"><img
src="/static/images/hf_sign.png"
/>到账金额:<a
class="text-green"
ng-bind="(clearing.clearing_amount - clearing.channel_surcharge)|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="clearing.channe=='rpay'"><img
ng-if="clearing.channel=='rpay'"><img
src="/static/images/r_logo.svg"
/>到账金额:<a
class="text-green"
ng-bind="(clearing.clearing_amount - clearing.channel_surcharge)|currency:'AUD'"></a></p>
</div>
<p class="text-bold col-sm-12" align="left">总到账金额:<a
class="text-green"
ng-bind="fut.total_clearing|currency:'AUD'"></a></p>
</div>
</div>
<!-- /.box-body -->

Loading…
Cancel
Save