Commit 36c467d7 authored by hangjun83's avatar hangjun83

乐妍]

parent 0fe01137
......@@ -95,8 +95,6 @@ class LeyanService
$bId = 108;
try {
$id = 0;
$dbConnect = DB::connection('bh_mysql');
$dbConnect->beginTransaction();
......@@ -104,6 +102,8 @@ class LeyanService
foreach ($products as $product) {
$id = 0;
$chemicalsRow = $dbConnect->table('chemicals')
->where('c_cas', $product['casNo'])
->get()->toArray();
......@@ -120,10 +120,12 @@ class LeyanService
foreach($product as $item){
$p_tod = '无货,请咨询';
$status = 0;
if(!empty($item['productStockInfos'])){
foreach($item['productStockInfos'] as $stock){
if ($stock['city'] == '上海' && $stock['number'] > 0) {
$p_tod = '现货';
$status = 1;
break;
}
}
......@@ -159,7 +161,7 @@ class LeyanService
$pro_data['p_price'] = $package['price'];
$pro_data['p_tod'] = $p_tod;
$pro_data['p_weight'] = '0.01';
$pro_data['p_status'] = 1;
$pro_data['p_status'] = $status;
$pro_data['p_show'] = 0;
$pro_data['prom_from'] = 0;
$pro_data['prom_to'] = 0;
......@@ -170,7 +172,7 @@ class LeyanService
$productRow = current($productRow);
$pro_data['p_status'] = 1;
$pro_data['p_status'] = $status;
$pro_data['p_show'] = 0;
$pro_data['p_price'] = $package['price'];
$pro_data['p_tod'] = $p_tod;
......
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 to comment