Commit d954786f by mushishixian

fiax

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