|
|
@@ -8,6 +8,7 @@ use App\OracleDOCASNHeader;
|
|
|
use App\Services\HandInStorageService;
|
|
|
use Carbon\Carbon;
|
|
|
use Illuminate\Http\Request;
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
|
|
|
class HandInStorageController extends Controller
|
|
|
{
|
|
|
@@ -81,12 +82,15 @@ class HandInStorageController extends Controller
|
|
|
*/
|
|
|
public function getBasSkuWithLot(Request $request): array
|
|
|
{
|
|
|
+ $start=microtime(true);
|
|
|
$customerid= $request->input('customerid');
|
|
|
$skuOrBarcode= $request->input('sku');
|
|
|
$asnno= $request->input('asnno');
|
|
|
$asnDetail=app('HandInStorageService')->getAsnDetail($asnno,$skuOrBarcode);
|
|
|
if (!$asnDetail)$this->error('无效条码');
|
|
|
$basSku =app('HandInStorageService')->getBasSkuLotId($customerid,$asnDetail->sku);
|
|
|
+ $end=microtime(true);
|
|
|
+ if(($end-$start)>1)Log::warning('手持条码获取详情超时',$request->all());
|
|
|
if (isset($basSku)&&isset($asnDetail))return ['success'=>true,'basSku'=>$basSku,'asnDetail'=>$asnDetail];
|
|
|
else $this->error('无效条码');
|
|
|
}
|
|
|
@@ -97,6 +101,7 @@ class HandInStorageController extends Controller
|
|
|
*/
|
|
|
public function fluxHandIn(Request $request)
|
|
|
{
|
|
|
+ $start=microtime(true);
|
|
|
$this->gate("入库管理-手持入库-收货");
|
|
|
$info=$request->input('info');
|
|
|
if ($info['lotatt02']&&Carbon::now()->gt($info['lotatt02']))$this->error('失效日期超过入库效期');
|
|
|
@@ -119,6 +124,8 @@ class HandInStorageController extends Controller
|
|
|
$result = $handInStorageService->fluxHandIn($info);
|
|
|
if ($result){
|
|
|
$asnQty=$handInStorageService->getAsnQty($info['asnno']);
|
|
|
+ $end=microtime(true);
|
|
|
+ if(($end-$start)>2)Log::warning('手持收货超时',$request->all());
|
|
|
$this->success($asnQty);
|
|
|
} else $this->error("收货失败");
|
|
|
} catch (\Exception $e) {
|