Commit 36dd61a2 by 杨树贤

审核规则的精简

parent baa95f61
......@@ -1309,10 +1309,10 @@ class DataService
$esUrl = env('ES_URL', '');
$map = [
"source" => 7,
"supplier_id" => 17,
"supplier_id" => 17,
"goods_status" => 1,
];
$return = curl($esUrl.'/es/countZhuanmaiSource', $map, 1);
$return = curl($esUrl . '/es/countZhuanmaiSource', $map, 1);
$return = json_decode($return, true);
$yunxinUploadSupplierCount = 0;
if (isset($return['code']) & $return['code'] == 0) {
......@@ -1560,4 +1560,17 @@ class DataService
})->export('csv');
}
//初始化sku规则
public function initSkuRulers()
{
//全部供应商修改默认值
SupplierChannelModel::where('supplier_id', 12270)->update([
// SupplierChannelModel::where('supplier_id', '>', 0)->update([
'sku_audit_ruler' => json_encode([
'skip' => 1,
'audit_ruler' => ["1" => 1],
])
]);
}
}
\ No newline at end of file
......@@ -109,7 +109,6 @@ class SupplierService
//sku上传规则相关设置
$skuAuditRulerService = new SupplierSkuAuditRulerService();
$channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']);
/**新增供应商操作**/
if (empty($channel['supplier_id'])) {
//处理附件信息,新增的时候才会有附件信息提交过来
......
......@@ -57,12 +57,12 @@ class SupplierSkuAuditRulerService
*/
$defaultRuler = [
'1' => 1,
'2' => 1,
'3' => 1,
'4' => 1
// '2' => 1,
// '3' => 1,
// '4' => 1
];
if (empty($auditData)) {
$auditRuler['skip'] = 0;
$auditRuler['skip'] = 1;
$auditRuler['audit_ruler'] = $defaultRuler;
return json_encode($auditRuler);
}
......
......@@ -77,7 +77,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\DataService())->statisticsSkuNumberFromSKu();
(new \App\Http\Services\DataService())->initSkuRulers();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
......
......@@ -184,15 +184,15 @@ return [
"skip" => 0,//1无需审核,0需要审核
"audit_ruler" => [
"1" => 1, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"2" => 1, //依次类推类推
"3" => 1,
"4" => 1,
// "2" => 1, //依次类推类推
// "3" => 1,
// "4" => 1,
],
"name_map" => [
"1" => '型号与品牌已存在',
"2" => '型号不存在,品牌存在',
"3" => '型号不存在,品牌不存在',
"4" => '型号存在,品牌不存在',
// "2" => '型号不存在,品牌存在',
// "3" => '型号不存在,品牌不存在',
// "4" => '型号存在,品牌不存在',
]
],
......
......@@ -17,7 +17,7 @@
}
</style>
<div class="layui-card">
<div class="layui-card-header fix-top" style="box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.5);">
<div class="layui-card-header fix-top" style="box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.5);">
<div class="layui-row">
<div class="layui-col-md2">
<b>{{$supplier['supplier_name']}}</b>
......@@ -178,10 +178,10 @@
</div>
<div class="layui-row">
<span class="required_field">*</span> 主营品牌 :{{$supplier['main_brand_names']}}
{{-- <div style="">--}}
{{-- 主营品牌数量--}}
{{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}}
{{-- </div>--}}
{{-- <div style="">--}}
{{-- 主营品牌数量--}}
{{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}}
{{-- </div>--}}
</div>
@if($supplier['supplier_group'] == \App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX)
<div class="layui-row">
......
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