提交 4e39ff3e authored 作者: chengye's avatar chengye

test

上级 fd7e90ee
......@@ -9,12 +9,9 @@
namespace app\api\controller\v2\common;
use app\em\controller\Invoice;
use app\em\model\EmAccount;
use app\em\model\EmInvoice;
use app\em\model\EmPayment;
use app\em\model\EmPaymentFk;
use app\em\model\EmPaymentInvoice;
use app\em\model\EmPaymentInvoiceBalance;
use think\Exception;
use think\facade\Log;
class Payment
......@@ -112,4 +109,19 @@ class Payment
{
return substr_replace($statusCode, $value, $index, 1);
}
public function test()
{
$account_id = 'ZH2020071609062';
$payment_id = 'JF2020071634700';
$res = null;
try {
$res = (new Invoice())->writeOffFromPayment($account_id, $payment_id);
} catch (\Exception $e){
$res = $e->getMessage();
Log::error('##res##:'.$res);
}
return $res;
}
}
\ No newline at end of file
......@@ -33,4 +33,5 @@ Route::get('/v1/basestate','api/v1.supplier.Assign/getBasestate'); //基站状
Route::get('/v1/permission','api/v1.supplier.Assign/getDataPermission'); //获取项目数据权限
//电费
Route::get('/v2/payment','api/v2.common.Payment/index'); //缴费接口
\ No newline at end of file
Route::get('/v2/payment','api/v2.common.Payment/index'); //缴费接口
Route::get('/v2/payment','api/v2.common.Payment/test'); //缴费test接口
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论