|
|
@@ -346,9 +346,10 @@ class InventoryAccountService
|
|
|
//盘点修改盘点任务数据
|
|
|
public function updateInventory($inventoryAccountId){
|
|
|
$inventoryAccount=InventoryAccount::find($inventoryAccountId);
|
|
|
- $inventoryAccount->processed=$inventoryAccount->getProcessedAttribute();//已盘点数
|
|
|
- $inventoryAccount->difference=$inventoryAccount->getDifferenceAttribute();//盘点差异数
|
|
|
- $inventoryAccount->returned=$inventoryAccount->getReturnedAttribute(); //复盘归位数
|
|
|
+ $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
|
|
|
+ $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
|
|
|
+ $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
|
|
|
+ $inventoryAccount->ignored=$inventoryAccount->getIgnoredAmount(); //跳过数
|
|
|
if($inventoryAccount->status=='待盘点')
|
|
|
$inventoryAccount->status='盘点中';
|
|
|
$inventoryAccount->update();
|
|
|
@@ -430,9 +431,10 @@ class InventoryAccountService
|
|
|
Controller::logS(__METHOD__,"增加盘点人".__FUNCTION__,json_encode($inventoryId));
|
|
|
$inventoryAccount=InventoryAccount::query()->find($inventoryId);
|
|
|
$inventoryAccount->total=$inventoryAccount->total+1;
|
|
|
- $inventoryAccount->processed=$inventoryAccount->getProcessedAttribute();//已盘点数
|
|
|
- $inventoryAccount->difference=$inventoryAccount->getDifferenceAttribute();//盘点差异数
|
|
|
- $inventoryAccount->returned=$inventoryAccount->getReturnedAttribute(); //复盘归位数
|
|
|
+ $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
|
|
|
+ $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
|
|
|
+ $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
|
|
|
+ $inventoryAccount->ignored=$inventoryAccount->getIgnoredAmount();
|
|
|
$inventoryAccount->update();
|
|
|
Controller::logS(__METHOD__,"修改盘点任务记录".__FUNCTION__,json_encode($inventoryId));
|
|
|
$inventoryAccountMission=InventoryAccountMission::with(['commodity.barcodes','stockInventoryPersons'])->where('id',$inventoryAccountMission->id)->first();
|
|
|
@@ -539,9 +541,10 @@ class InventoryAccountService
|
|
|
if ($inventoryAccountMission>0){
|
|
|
$inventoryAccount=InventoryAccount::query()->find($inventoryAccountId);
|
|
|
$inventoryAccount->total=$inventoryAccount->total-1;
|
|
|
- $inventoryAccount->processed=$inventoryAccount->getProcessedAttribute();//已盘点数
|
|
|
- $inventoryAccount->difference=$inventoryAccount->getDifferenceAttribute();//盘点差异数
|
|
|
- $inventoryAccount->returned=$inventoryAccount->getReturnedAttribute(); //复盘归位数
|
|
|
+ $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
|
|
|
+ $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
|
|
|
+ $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
|
|
|
+ $inventoryAccount->ignored=$inventoryAccount->getIgnoredAmount();
|
|
|
$inventoryAccount->update();
|
|
|
Controller::logS(__METHOD__,'删除盘点记录时修改盘点任务信息'.__FUNCTION__,json_encode($inventoryAccountId));
|
|
|
}
|
|
|
@@ -554,9 +557,10 @@ class InventoryAccountService
|
|
|
app('LogService')->log(__METHOD__,"跳过盘点记录修改checked状态",json_encode($inventoryAccountMissionId));
|
|
|
if ($inventoryAccountMission->checked=='跳过'){
|
|
|
$inventoryAccount=InventoryAccount::query()->find($inventoryAccountId);
|
|
|
- $inventoryAccount->processed=$inventoryAccount->getProcessedAttribute();//已盘点数
|
|
|
- $inventoryAccount->difference=$inventoryAccount->getDifferenceAttribute();//盘点差异数
|
|
|
- $inventoryAccount->returned=$inventoryAccount->getReturnedAttribute(); //复盘归位数
|
|
|
+ $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
|
|
|
+ $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
|
|
|
+ $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
|
|
|
+ $inventoryAccount->ignored=$inventoryAccount->getIgnoredAmount();
|
|
|
$inventoryAccount->update();
|
|
|
Controller::logS(__METHOD__,'跳过盘点记录时修改盘点任务信息'.__FUNCTION__,json_encode($inventoryAccountId));
|
|
|
}
|
|
|
@@ -582,9 +586,10 @@ class InventoryAccountService
|
|
|
}
|
|
|
app('LogService')->log(__METHOD__,"批量跳过或确认差异",json_encode($checkData));
|
|
|
$inventoryAccount=InventoryAccount::query()->find($inventoryAccountId);
|
|
|
- $inventoryAccount->processed=$inventoryAccount->getProcessedAttribute();//已盘点数
|
|
|
- $inventoryAccount->difference=$inventoryAccount->getDifferenceAttribute();//盘点差异数
|
|
|
- $inventoryAccount->returned=$inventoryAccount->getReturnedAttribute(); //复盘归位数
|
|
|
+ $inventoryAccount->processed=$inventoryAccount->getProcessedAmount();//已盘点数
|
|
|
+ $inventoryAccount->difference=$inventoryAccount->getDifferenceAmount();//盘点差异数
|
|
|
+ $inventoryAccount->returned=$inventoryAccount->getReturnedAmount(); //复盘归位数
|
|
|
+ $inventoryAccount->ignored=$inventoryAccount->getIgnoredAmount();
|
|
|
$inventoryAccount->update();
|
|
|
Controller::logS(__METHOD__,'批量跳过或确认差异修改盘点任务信息'.__FUNCTION__,json_encode($inventoryAccountId));
|
|
|
return $inventoryAccountMissions;
|