From 82e4435a2cca7569342524a33d270f5018484385 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 24 Sep 2025 17:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=B1=87=E9=99=84=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/controller/FinReceiptController.php | 5 +++++ app/common/model/FinReceipt.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/common/controller/FinReceiptController.php b/app/common/controller/FinReceiptController.php index c80dc3a..a443537 100644 --- a/app/common/controller/FinReceiptController.php +++ b/app/common/controller/FinReceiptController.php @@ -5,6 +5,7 @@ use app\common\controller\BaseController; use app\common\model\Country; use app\common\model\SysAccount; use app\common\model\SysCurrency; +use app\common\service\OssService; use app\common\traits\crud\CrudControllerTrait; use app\common\service\FinReceiptService; @@ -41,6 +42,8 @@ class FinReceiptController extends BaseController $data['country_name'] = Country::where('id', $data['currency_id'])->first()->cn_addr; if (isset($data['currency_id'])) //付款币种 $data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->first()->currency_name; + if (isset($data['fx_receipt_file'])) + $data['fx_receipt_file_full'] = (new OssService)->generatePrivateUrl($data['fx_receipt_file']); return $data; } @@ -66,6 +69,8 @@ class FinReceiptController extends BaseController $data['country_name'] = Country::where('id', $data['currency_id'])->first()->cn_addr; if (isset($data['currency_id'])) //付款币种 $data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->first()->currency_name; + if (isset($data['fx_receipt_file'])) + $data['fx_receipt_file_full'] = (new OssService)->generatePrivateUrl($data['fx_receipt_file']); return $data; } } \ No newline at end of file diff --git a/app/common/model/FinReceipt.php b/app/common/model/FinReceipt.php index c87ab12..dbefafa 100644 --- a/app/common/model/FinReceipt.php +++ b/app/common/model/FinReceipt.php @@ -40,7 +40,7 @@ class FinReceipt extends Model /** * 允许自动填充模型字段 */ - protected $fillable = ['id', 'receipt_no', 'payment_apply_id', 'country_id', 'remitter', 'account_id', 'currency_id', 'amount', 'discount_amount', 'total_amount_cny', 'exchange_rate', 'arrived_at', 'received_at', 'voucher_no', 'fx_receipt_file', 'is_domestic_return', 'created_by', 'updated_by', 'created_at', 'updated_at']; + protected $fillable = ['id', 'receipt_no', 'payment_apply_id', 'country_id', 'remitter', 'account_id', 'currency_id', 'amount', 'discount_amount', 'total_amount_cny', 'exchange_rate', 'arrived_at', 'received_at', 'voucher_no', 'fx_receipt_file', 'fx_receipt_file_name', 'is_domestic_return', 'created_by', 'updated_by', 'created_at', 'updated_at']; /** * 不允许自动填充模型字段