fix yd older than 2 months orders

This commit is contained in:
omair saleh
2022-03-31 20:30:49 +08:00
parent 908f3fc11b
commit cd141bf988
@@ -138,13 +138,13 @@ class FetchOrderListsFromYdPortalProcessor
try {
$start = $start ? $start : Carbon::now()->subMonths(4);
$startLimit = Carbon::parse('23-02-2022');
$startLimit = Carbon::parse('01-12-2021');
if($start->isBefore($startLimit)){
$start = $startLimit;
}
$end = $end ? $end : Carbon::parse('24-02-2022');
$end = $end ? $end : Carbon::now();
$orderRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/GetOrderList.ashx', 'GET', [
'begintime' => $start->timestamp,
@@ -154,7 +154,6 @@ class FetchOrderListsFromYdPortalProcessor
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($orderRequest);
foreach($rows->data as $row){
if($row->expressno !== 'M202202230904163') continue;
$containerReference = null;
$loadingDate = null;
$unstuffingDate = null;