Merge branch 'develop'
# Conflicts: # app/admin/controller/dashboard/FinStatisticsController.php # app/common/controller/FinPaymentApplyController.php # app/common/controller/FinReceiptController.php # app/common/logic/FinReceiptLogic.php # app/common/model/FinPaymentApply.php # app/common/model/FinReceipt.php # app/common/service/FinPaymentApplyService.php # app/common/service/FinReceiptService.php # app/common/service/StockOrdersService.php # config/route.php
This commit is contained in:
@@ -12,6 +12,7 @@ use app\common\model\User;
|
||||
use app\common\service\OssService;
|
||||
use app\common\traits\crud\CrudControllerTrait;
|
||||
use app\common\service\FinReceiptService;
|
||||
use support\Redis;
|
||||
use support\Request;
|
||||
|
||||
class FinReceiptController extends BaseController
|
||||
@@ -34,7 +35,11 @@ class FinReceiptController extends BaseController
|
||||
{
|
||||
try {
|
||||
$id = $request->input('id');
|
||||
$raw = $this->service->credit($id);
|
||||
$exchange_rate = $request->input('exchange_rate');
|
||||
if(empty($exchange_rate) || !is_numeric($exchange_rate)){
|
||||
return $this->error('请输入汇率');
|
||||
}
|
||||
$raw = $this->service->credit($id,$exchange_rate);
|
||||
return $this->success($raw);
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
@@ -81,14 +86,20 @@ class FinReceiptController extends BaseController
|
||||
{
|
||||
if (isset($data['created_at'])){
|
||||
$data['claim_timeout'] = (($data['created_at'] < (time()-86400)) && empty($data['payment_apply_id'])) ?1:0;
|
||||
$data['claim_timeout_time'] = date('Y-m-d H:i:s', $data['created_at']+86400);
|
||||
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
||||
}
|
||||
if (isset($data['updated_at']))
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
if (isset($data['arrived_at']))
|
||||
$data['arrived_at'] = date('Y-m-d H:i:s', $data['arrived_at']);
|
||||
if (isset($data['received_at']))
|
||||
if (isset($data['received_at'])){
|
||||
$data['received_at'] = date('Y-m-d H:i:s', $data['received_at']);
|
||||
$voucher_no_timeout_hour = redis::get('voucher_no_timeout_hour');
|
||||
if(!empty($voucher_no_timeout_hour)){
|
||||
$data['voucher_no_timeout_time'] = date('Y-m-d H:i:s', time()+(60*60*$voucher_no_timeout_hour));
|
||||
}
|
||||
}
|
||||
if (isset($data['account_id'])) { //收款账号
|
||||
$data['account_name'] = SysAccount::where('id', $data['account_id'])->value('account_name')??'';
|
||||
$data['account_short_desc'] = SysAccount::where('id', $data['account_id'])->value('short_desc')??'';
|
||||
|
||||
Reference in New Issue
Block a user