Finish mzl_dev
This commit is contained in:
@@ -72,11 +72,21 @@ class StockOrdersService extends \app\common\service\StockOrdersService
|
||||
{
|
||||
$config = $this->buildQueryConfig($request, 'detail');
|
||||
$item = $this->logicShow($config);
|
||||
|
||||
// 检查是否至少有一个车辆填写了vin
|
||||
$hasVin = false;
|
||||
foreach ($item->items as $k => $v) {
|
||||
if ($v->vin === '') {
|
||||
throw new BusinessException('存在未填写vin的车辆,无法完成提交审核');
|
||||
if ($v->vin !== '') {
|
||||
$hasVin = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有任何车辆填写vin,则抛出异常
|
||||
if (!$hasVin) {
|
||||
throw new BusinessException('至少需要为一辆车辆填写vin,才能提交审核');
|
||||
}
|
||||
|
||||
$this->logicUpdateBy($config, [
|
||||
'approval_status' => 1
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user