Commit 2982d81e by 杨树贤

重新修改审核流程

parent 7bad53a1
Showing with 4 additions and 6 deletions
...@@ -72,7 +72,6 @@ class SupplierService ...@@ -72,7 +72,6 @@ class SupplierService
$oldSupplier = $model->where('supplier_id', $channel['supplier_id'])->first(); $oldSupplier = $model->where('supplier_id', $channel['supplier_id'])->first();
$oldSupplier = $supplierTransformer->transformInfo($oldSupplier); $oldSupplier = $supplierTransformer->transformInfo($oldSupplier);
} }
$needAudit = true; $needAudit = true;
//走事务 //走事务
$supplierId = DB::connection('web')->transaction(function () use ($channel, $model, $oldSupplier, &$needAudit) { $supplierId = DB::connection('web')->transaction(function () use ($channel, $model, $oldSupplier, &$needAudit) {
...@@ -108,7 +107,7 @@ class SupplierService ...@@ -108,7 +107,7 @@ class SupplierService
$skuAuditRulerService = new SupplierSkuAuditRulerService(); $skuAuditRulerService = new SupplierSkuAuditRulerService();
$channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']); $channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']);
//新增供应商操作 /**新增供应商操作**/
if (empty($channel['supplier_id'])) { if (empty($channel['supplier_id'])) {
//处理附件信息,新增的时候才会有附件信息提交过来 //处理附件信息,新增的时候才会有附件信息提交过来
$attachmentField = [ $attachmentField = [
...@@ -317,7 +316,6 @@ class SupplierService ...@@ -317,7 +316,6 @@ class SupplierService
unset($newSupplier['update_time']); unset($newSupplier['update_time']);
if ($oldSupplier == $newSupplier) { if ($oldSupplier == $newSupplier) {
$logService->AddLog($this->newSupplierId, LogModel::UPDATE_OPERATE, '修改供应商基本资料', '没有内容变化'); $logService->AddLog($this->newSupplierId, LogModel::UPDATE_OPERATE, '修改供应商基本资料', '没有内容变化');
return $supplierId;
} }
} }
...@@ -327,9 +325,10 @@ class SupplierService ...@@ -327,9 +325,10 @@ class SupplierService
])); ]));
//这里有个申请审核的判断逻辑 //这里有个申请审核的判断逻辑
//如果是申请审核,还要去修改审核状态 //如果是申请审核,并且原来的状态不是已通过,无论什么情况,都要变成审核中,如果是已通过,那么就要走下面的判断是否要忽略审核流程
$isAudit = (bool)request()->input('is_audit'); $isAudit = (bool)request()->input('is_audit');
if ($isAudit && $needAudit) { if ($isAudit && $oldSupplier['status'] == SupplierChannelModel::STATUS_PASSED && !$needAudit && !empty($channel['supplier_id'])) {
} else if ($isAudit) {
$auditData[] = [ $auditData[] = [
'supplier_id' => $supplierId, 'supplier_id' => $supplierId,
//供应商类型为临时供应商,才会去存申请理由 //供应商类型为临时供应商,才会去存申请理由
...@@ -337,7 +336,6 @@ class SupplierService ...@@ -337,7 +336,6 @@ class SupplierService
]; ];
$this->batchApplyInReviewSupplier($auditData); $this->batchApplyInReviewSupplier($auditData);
} }
return $supplierId; return $supplierId;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment