车辆归属的船舶
This commit is contained in:
@@ -7,12 +7,18 @@ use support\Response;
|
||||
use plugin\admin\app\model\LogisticsShip;
|
||||
use plugin\admin\app\controller\Crud;
|
||||
use support\exception\BusinessException;
|
||||
use util\Util;
|
||||
|
||||
/**
|
||||
* 船舶信息
|
||||
*/
|
||||
class LogisticsShipController extends Crud
|
||||
{
|
||||
/**
|
||||
* 不需要鉴权的方法
|
||||
* @var string[]
|
||||
*/
|
||||
protected $noNeedAuth = ['getAll'];
|
||||
|
||||
/**
|
||||
* @var LogisticsShip
|
||||
@@ -87,4 +93,11 @@ class LogisticsShipController extends Crud
|
||||
]);
|
||||
}
|
||||
|
||||
public function getAll()
|
||||
{
|
||||
$lang = session('lang', 'zh-cn');
|
||||
$locations = LogisticsShip::whereIn('status',[0,1])->get();
|
||||
return Util::success($locations);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -280,6 +280,18 @@ class VehicleController extends Crud
|
||||
$sourceLang = $languages[$lang];
|
||||
unset($languages[$lang]);
|
||||
|
||||
$data_t = $data;
|
||||
unset($data['brand']);
|
||||
unset($data['model']);
|
||||
unset($data['purchase']);
|
||||
unset($data['procedure_location']);
|
||||
unset($data['fbo_destination']);
|
||||
foreach ($translationModels as $model) {
|
||||
$vehicle = $model::find($data_t['id']);
|
||||
$vehicle->fill($data_t);
|
||||
$vehicle->save();
|
||||
}
|
||||
|
||||
// 创建翻译服务实例
|
||||
$translatorService = new \app\service\TranslatorService();
|
||||
foreach ($languages as $lang) {
|
||||
|
||||
Reference in New Issue
Block a user