|
|
@@ -87,29 +87,14 @@ class TestController extends Controller
|
|
|
function t2(Request $request)
|
|
|
{ //x $packagesBatch=Package::where('batch_number',$batch_number)->first();
|
|
|
|
|
|
- $uploaded = 0;
|
|
|
- $count = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
|
|
|
- ->where('created_at', '>', "2020-06-03 14:02:00")
|
|
|
- ->where('created_at', '<', "2020-06-03 15:05:00")
|
|
|
- ->where('type', "request_new_")
|
|
|
- ->where('description', 'like', "%W200603000117%")
|
|
|
- ->count();
|
|
|
- $requests = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
|
|
|
- ->where('created_at', '>', "2020-06-03 14:02:00")
|
|
|
- ->where('created_at', '<', "2020-06-03 15:05:00")
|
|
|
- ->where('description', 'like', "%W200603000117%")
|
|
|
- ->where('type', "request_new_")
|
|
|
+
|
|
|
+ $objs=OracleDOCOrderHeader::select(['EDI_RESENDTIME'])->where('edisendflag','W')
|
|
|
+ ->where('EDI_RESENDTIME','>',Carbon::now()->subDays(2))
|
|
|
+ ->where('edisendtime','>',Carbon::now()->subDays(2))
|
|
|
+ ->where('ediremarks2','<>','不支持的单据类型')
|
|
|
->get();
|
|
|
- $requests->each(function ($request) use (&$uploaded) {
|
|
|
- $requestJson = json_decode($request->description, true);
|
|
|
- $response = Zttp::withHeaders(['content-type' => 'application/json',
|
|
|
- ])->post('https://was.baoshi56.com/api/thirdPart/flux/package/new',
|
|
|
- $requestJson
|
|
|
- );
|
|
|
- if ($response->json() && $response->json()['response'] && $response->json()['response']['flag'] == 'Y')
|
|
|
- $uploaded += 1;
|
|
|
- });
|
|
|
- dd($uploaded . '/' . $count);
|
|
|
+// ->update(['edisendflag'=>'N','manualflag'=>'N','EDI_RESENDTIME'=>Carbon::now()]);
|
|
|
+ dd($objs);
|
|
|
|
|
|
|
|
|
}
|