Commit 83beea0d by 杨树贤

审核日志判断

parent 2982d81e
Showing with 9 additions and 4 deletions
......@@ -308,6 +308,7 @@ class SupplierService
$logContent = '确认新增供应商';
}
$contentChange = true;
//过滤掉没有修改的操作,但是需要记录一条更新记录(用于判断是否可以审核)
if (!empty($oldSupplier) && !empty($newSupplier)) {
$oldSupplier = $oldSupplier->toArray();
......@@ -315,14 +316,18 @@ class SupplierService
unset($oldSupplier['update_time']);
unset($newSupplier['update_time']);
if ($oldSupplier == $newSupplier) {
$contentChange = false;
$logService->AddLog($this->newSupplierId, LogModel::UPDATE_OPERATE, '修改供应商基本资料', '没有内容变化');
}
}
$logService->AddLog($this->newSupplierId, $logType, $logAction, $logContent, json_encode([
'old_supplier' => $oldSupplier,
'new_supplier' => $newSupplier
]));
if ($contentChange) {
$logService->AddLog($this->newSupplierId, $logType, $logAction, $logContent, json_encode([
'old_supplier' => $oldSupplier,
'new_supplier' => $newSupplier
]));
}
//这里有个申请审核的判断逻辑
//如果是申请审核,并且原来的状态不是已通过,无论什么情况,都要变成审核中,如果是已通过,那么就要走下面的判断是否要忽略审核流程
......
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