修改更新商品库存
This commit is contained in:
parent
ee6eed9261
commit
f577c6c3cd
@ -101,12 +101,6 @@ class getProductCommand extends HyperfCommand
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($item['thirdDrugCode'])) {
|
|
||||||
Db::rollBack();
|
|
||||||
// $this->line("商品更新失败,缺少第三方药房药品编码" . json_encode($item, JSON_UNESCAPED_UNICODE));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($item['drugPrice'])) {
|
if (empty($item['drugPrice'])) {
|
||||||
Db::rollBack();
|
Db::rollBack();
|
||||||
// $this->line("商品更新失败,缺少药品价格" . json_encode($item, JSON_UNESCAPED_UNICODE));
|
// $this->line("商品更新失败,缺少药品价格" . json_encode($item, JSON_UNESCAPED_UNICODE));
|
||||||
@ -116,7 +110,6 @@ class getProductCommand extends HyperfCommand
|
|||||||
// 查询是否存在
|
// 查询是否存在
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['product_platform_code'] = $item['drugCode'];
|
$params['product_platform_code'] = $item['drugCode'];
|
||||||
$params['product_pharmacy_code'] = $item['thirdDrugCode'];
|
|
||||||
$product_platform = ProductPlatform::getOne($params);
|
$product_platform = ProductPlatform::getOne($params);
|
||||||
if (!empty($product_platform)) {
|
if (!empty($product_platform)) {
|
||||||
// 已存在,更新
|
// 已存在,更新
|
||||||
@ -185,6 +178,14 @@ class getProductCommand extends HyperfCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 第三方药店商品编码
|
||||||
|
if (isset($item['thirdDrugCode'])) {
|
||||||
|
if ($product_platform['product_pharmacy_code'] != $item['thirdDrugCode']) {
|
||||||
|
$product_platform_data['product_pharmacy_code'] = $item['thirdDrugCode'];
|
||||||
|
$product_data['product_pharmacy_code'] = $item['thirdDrugCode'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 基本包装数量
|
// 基本包装数量
|
||||||
if (isset($item['basicPackingCount'])) {
|
if (isset($item['basicPackingCount'])) {
|
||||||
if ($product_platform['packaging_count'] != $item['basicPackingCount']) {
|
if ($product_platform['packaging_count'] != $item['basicPackingCount']) {
|
||||||
@ -251,7 +252,9 @@ class getProductCommand extends HyperfCommand
|
|||||||
$data['product_platform_code'] = $item['drugCode'];
|
$data['product_platform_code'] = $item['drugCode'];
|
||||||
|
|
||||||
// 第三方药店商品编码
|
// 第三方药店商品编码
|
||||||
|
if (isset($item['thirdDrugCode'])){
|
||||||
$data['product_pharmacy_code'] = $item['thirdDrugCode'];
|
$data['product_pharmacy_code'] = $item['thirdDrugCode'];
|
||||||
|
}
|
||||||
|
|
||||||
// 商品规格
|
// 商品规格
|
||||||
if (isset($item['specifications'])) {
|
if (isset($item['specifications'])) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user