|
|
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
|
use App\Authority;
|
|
|
+use App\Batch;
|
|
|
use App\Carrier;
|
|
|
use App\Commodity;
|
|
|
use App\CommodityBarcode;
|
|
|
@@ -334,28 +335,6 @@ class TestController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function delme()
|
|
|
- {
|
|
|
- $fields = [
|
|
|
- 'doc_order_header.userdefine1',
|
|
|
- 'doc_order_header.userdefine2',
|
|
|
- 'doc_order_header.SOReference5',
|
|
|
- 'doc_order_header.waveno',
|
|
|
- 'doc_order_header.orderno',
|
|
|
- 'doc_order_header.customerid',
|
|
|
- 'doc_order_header.Consigneename'
|
|
|
- ];
|
|
|
- if ('') {
|
|
|
- $resultOracleObj = OracleDOCOrderHeader::select($fields)->where('orderno', 'SO200603004708');
|
|
|
- } else {
|
|
|
- $resultOracleObj = OracleActAllocationDetails::select($fields);
|
|
|
- $resultOracleObj->where('picktotraceid', '546152742096');
|
|
|
- $resultOracleObj->leftJoin('DOC_Order_Header', 'act_allocation_details.orderno', 'doc_order_header.orderno');
|
|
|
- }
|
|
|
- $_temOracleInfo = $resultOracleObj->first();
|
|
|
-
|
|
|
- dd($_temOracleInfo);
|
|
|
- }
|
|
|
|
|
|
public function mergerPackageData()
|
|
|
{
|
|
|
@@ -1209,4 +1188,49 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
$tack->handle();
|
|
|
dump(11);
|
|
|
}
|
|
|
+
|
|
|
+ public function reNewBatches3()
|
|
|
+ {
|
|
|
+ $batches=Batch::query()->where('id','>',324)->get('code');
|
|
|
+// $batchCodes = $batches->map(function($batch){
|
|
|
+// return $batch['code'];
|
|
|
+// })->toArray();
|
|
|
+ $batchCodes = ['W201201000037',
|
|
|
+ 'W201201000038',
|
|
|
+ 'W201201000039',
|
|
|
+ 'W201201000040',
|
|
|
+ 'W201201000041',
|
|
|
+ 'W201201000052',
|
|
|
+ 'W201201000053',
|
|
|
+ 'W201201000054',
|
|
|
+ 'W201201000055',
|
|
|
+ 'W201201000056',
|
|
|
+ 'W201201000057',
|
|
|
+ 'W201201000071',
|
|
|
+ 'W201201000074',
|
|
|
+ 'W201201000075',
|
|
|
+ 'W201201000076',];
|
|
|
+ $requests=[];
|
|
|
+// $logs=Log::query()->select('description')->where('CREATED_AT','>','2020-11-11')
|
|
|
+// ->where('type',"issued_newBatch")
|
|
|
+// ->get();
|
|
|
+// dd($logs);
|
|
|
+ foreach($batchCodes as $code){
|
|
|
+// $request=Cache::get('temp'.$code)['description'];
|
|
|
+ $request=Log::query()->select('description')->where('CREATED_AT','>','2020-12-01')
|
|
|
+ ->where('type',"issued_newBatch")
|
|
|
+ ->where('description','like',"%{$code}%")
|
|
|
+ ->first();
|
|
|
+ if($request){
|
|
|
+ $response=Zttp::post('https://wcs.baoshi56.com/api/thirdPart/flux/sorting/newBatch',
|
|
|
+ json_decode($request['description'])
|
|
|
+ );
|
|
|
+ app('LogService')->log(__METHOD__,__FUNCTION__,$response->body());
|
|
|
+ $requests[]=$response->body();
|
|
|
+ }
|
|
|
+// Cache::put('temp'.$code,$request);
|
|
|
+// $requests[]=$request;
|
|
|
+ }
|
|
|
+ dd($requests);
|
|
|
+ }
|
|
|
}
|