|
|
@@ -161,7 +161,7 @@ class OrderIssueFilters
|
|
|
|
|
|
private function getOrderDetailQuery(): Builder
|
|
|
{
|
|
|
- if (!$this->orderDetailQuery){
|
|
|
+ if (!$this->orderDetailQuery) {
|
|
|
$this->orderDetailQuery = OrderDetail::query()->select('order_id');
|
|
|
}
|
|
|
return $this->orderDetailQuery;
|
|
|
@@ -218,8 +218,8 @@ class OrderIssueFilters
|
|
|
if ($this->shopQuery)
|
|
|
$this->getOrderQuery()->whereIn('shop_id', $this->shopQuery);
|
|
|
|
|
|
- if ($this->orderDetailQuery){
|
|
|
- $this->getOrderQuery()->whereIn('order_id',$this->orderDetailQuery);
|
|
|
+ if ($this->orderDetailQuery) {
|
|
|
+ $this->getOrderQuery()->whereIn('order_id', $this->orderDetailQuery);
|
|
|
}
|
|
|
|
|
|
if ($this->orderQuery)
|
|
|
@@ -231,12 +231,16 @@ class OrderIssueFilters
|
|
|
if ($this->rejectedBillQuery)
|
|
|
$this->getOrderIssueRejectedBIllQuery()->whereIn('logistic_number_return', $this->rejectedBillQuery);
|
|
|
|
|
|
- if ($this->orderIssueRejectedBIllQuery){
|
|
|
+ if ($this->orderIssueRejectedBIllQuery) {
|
|
|
$this->queryBuilder->whereIn('order_issues.order_id', $this->orderIssueRejectedBIllQuery);
|
|
|
}
|
|
|
|
|
|
if ($this->orderIssueProcessLogQuery)
|
|
|
$this->queryBuilder->whereIn('order_issues.id', $this->orderIssueProcessLogQuery);
|
|
|
+
|
|
|
+ if (!array_key_exists('created_at_start',$this->array_filter)) {
|
|
|
+ $this->queryBuilder->where('order_issues.created_at', '>=', "2022-06-01 00:00:00");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private function isSearchLike($str)
|
|
|
@@ -261,7 +265,7 @@ class OrderIssueFilters
|
|
|
public function log_content($log_content)
|
|
|
{
|
|
|
$order_issue_process_log_query = OrderIssueProcessLog::query()->selectRaw('order_issue_id')->where('content', 'like', $log_content);
|
|
|
- if (!array_key_exists('addtime',$this->params) ) {
|
|
|
+ if (!array_key_exists('addtime', $this->params)) {
|
|
|
$order_issue_process_log_query->where('created_at', '>=', Carbon::now()->subDays(31));
|
|
|
} else {
|
|
|
$order_issue_process_log_query->where('created_at', '>=', Carbon::now()->subDays($this->params['addtime']));
|
|
|
@@ -276,7 +280,7 @@ class OrderIssueFilters
|
|
|
|
|
|
public function is_new_rejecting($is_new_rejecting)
|
|
|
{
|
|
|
- $this->getOrderDetailQuery()->where('order_details.is_new_rejecting',$is_new_rejecting);
|
|
|
+ $this->getOrderDetailQuery()->where('order_details.is_new_rejecting', $is_new_rejecting);
|
|
|
}
|
|
|
|
|
|
public function logistic($logistic_id)
|
|
|
@@ -382,7 +386,7 @@ class OrderIssueFilters
|
|
|
|
|
|
public function rejectingStatus($rejectingStatus)
|
|
|
{
|
|
|
- $this->getOrderDetailQuery()->where('order_details.rejecting_status',$rejectingStatus);
|
|
|
+ $this->getOrderDetailQuery()->where('order_details.rejecting_status', $rejectingStatus);
|
|
|
}
|
|
|
|
|
|
public function order_issue_ids($order_issue_ids)
|
|
|
@@ -507,7 +511,8 @@ class OrderIssueFilters
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function warehouse($warehouseIds){
|
|
|
- $this->searchWay($this->getOrderQuery(),$warehouseIds,'orders.warehouse_id');
|
|
|
+ public function warehouse($warehouseIds)
|
|
|
+ {
|
|
|
+ $this->searchWay($this->getOrderQuery(), $warehouseIds, 'orders.warehouse_id');
|
|
|
}
|
|
|
}
|