|
|
@@ -106,10 +106,10 @@ class InventoryCompareService
|
|
|
$wmsInventoryCompareZp=$query->where('属性仓',$custom_location)->where('产品编码',$sku)->where('质量状态','ZP')->first();
|
|
|
$wmsInventoryCompareCc=$query->where('属性仓',$custom_location)->where('产品编码',$sku)->where('质量状态','CC')->first();
|
|
|
$wmsInventoryCompareDj=$query->where('属性仓',$custom_location)->where('产品编码',$sku)->where('质量状态','DJ')->first();
|
|
|
- //$unknownQualityStatus=$query->where('属性仓',$custom_location)->where('产品编码',$sku)->whereNotIn('质量状态',['DJ','CC','ZP']);
|
|
|
- //if (!$wmsInventoryCompareZp&&!$wmsInventoryCompareCc&&!$wmsInventoryCompareDj&&$unknownQualityStatus->isEmpty()){
|
|
|
- //$inventoryCompare=$this->createInventoryCompare_underImport($sku, $custom_location, $amount, $owner_id,$owner_name);
|
|
|
- //}
|
|
|
+ $unknownQualityStatus=$query->where('属性仓',$custom_location)->where('产品编码',$sku)->whereNotIn('质量状态',['DJ','CC','ZP']);
|
|
|
+ if (!$wmsInventoryCompareZp&&!$wmsInventoryCompareCc&&!$wmsInventoryCompareDj&&$unknownQualityStatus->isEmpty()){
|
|
|
+ $this->createInventoryCompare_underImport($sku, $custom_location, $amount, $owner_id,$owner_name);
|
|
|
+ }
|
|
|
$creatingMissionCode = $this->getCreatingMissionCode($owner_name);
|
|
|
$commodityId=Commodity::where('sku',$sku)->where('owner_id',$owner_id)->value('id');
|
|
|
if ($wmsInventoryCompareZp||$wmsInventoryCompareDj) {
|
|
|
@@ -140,7 +140,7 @@ class InventoryCompareService
|
|
|
];
|
|
|
array_push($wasInventoryCompares,$wasInventoryCompareCC);
|
|
|
}
|
|
|
- //if($unknownQualityStatus->isNotEmpty())return null;
|
|
|
+ if($unknownQualityStatus->isNotEmpty())return null;
|
|
|
}
|
|
|
$inventoryCompares=DB::table('inventory_compares')->insert($wasInventoryCompares);
|
|
|
if (!$inventoryCompares)return null;
|