Commit d954786f by mushishixian

fiax

parent b89f6e9c
...@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\DB; ...@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\DB;
class LogService class LogService
{ {
//添加日志 //添加日志
public function AddLog($supplierId, $type, $action, $content, $remark = '') public function AddLog($supplierId, $type, $action, $content, $remark = '')
{ {
...@@ -108,12 +109,15 @@ class LogService ...@@ -108,12 +109,15 @@ class LogService
return $file['file_name']; return $file['file_name'];
}, $newFiles); }, $newFiles);
//对比文件名变化 //对比文件名变化
$diffKeys = array_keys(array_diff($newFileNames, $oldFileNames)); $diffKeys = array_keys(array_diff_assoc($newFileNames, $oldFileNames));
$content = ''; $content = '';
foreach ($diffKeys as $key) { foreach ($diffKeys as $key) {
$oldFileName = array_get($oldFileNames, $key); $oldFileName = array_get($oldFileNames, $key);
$oldFileName = $oldFileName == '选择文件上传' ? ' ' : $oldFileName; $oldFileName = $oldFileName == '选择文件上传' ? ' ' : $oldFileName;
$newFileName = array_get($newFileNames, $key); $newFileName = array_get($newFileNames, $key);
if ($newFileName == "选择文件上传") {
continue;
}
$content .= array_get(config('fixed.FileNameMapping'), $content .= array_get(config('fixed.FileNameMapping'),
$key) . '由 [' . $oldFileName . '] 修改为 [' . $newFileName . ']; '; $key) . '由 [' . $oldFileName . '] 修改为 [' . $newFileName . ']; ';
} }
...@@ -123,8 +127,8 @@ class LogService ...@@ -123,8 +127,8 @@ class LogService
$oldFee = json_decode($oldSupplier['extra_fee'], true); $oldFee = json_decode($oldSupplier['extra_fee'], true);
$newFee = json_decode($newSupplier['extra_fee'], true); $newFee = json_decode($newSupplier['extra_fee'], true);
$content = "采购附加费由 [商品总价不满" . $oldFee['cn']['max'] . "元,收取" . $oldFee['cn']['price'] . "元;商品总价不满" . $content = "采购附加费由 [商品总价不满" . $oldFee['cn']['max'] . "元,收取" . $oldFee['cn']['price'] . "元;商品总价不满" .
$oldFee['cn']['max'] . "美金,收取" . $oldFee['cn']['price'] . $oldFee['hk']['max'] . "美金,收取" . $oldFee['hk']['price'] .
"元;] 修改为 [商品总价不满" . $newFee['hk']['max'] . "元,收取" . $newFee['hk']['price'] . "元;商品总价不满" . "元;] 修改为 [商品总价不满" . $newFee['cn']['max'] . "元,收取" . $newFee['cn']['price'] . "元;商品总价不满" .
$newFee['hk']['max'] . "美金,收取" . $newFee['hk']['price'] . "元;]"; $newFee['hk']['max'] . "美金,收取" . $newFee['hk']['price'] . "元;]";
$result[] = $content; $result[] = $content;
} }
......
...@@ -36,6 +36,8 @@ class SupplierSkuAuditRulerService ...@@ -36,6 +36,8 @@ class SupplierSkuAuditRulerService
public function getSkuAuditRuler($ruler) public function getSkuAuditRuler($ruler)
{ {
if (empty($ruler)) { if (empty($ruler)) {
$defaultRuler = config('fixed.SkuAuditRuler');
unset($defaultRuler['name_map']);
return config('fixed.SkuAuditRuler'); return config('fixed.SkuAuditRuler');
} else { } else {
return json_decode($ruler, true); return json_decode($ruler, true);
......
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