Commit 2982d81e by 杨树贤

重新修改审核流程

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