|
|
@@ -81,7 +81,11 @@ class MonthlyGarments extends Api
|
|
|
$query->where('DATE_FORMAT(Sys_rq, "%Y-%m")', $yearMonth);
|
|
|
}
|
|
|
|
|
|
- if ($customerCode) {
|
|
|
+ if ($customerCode === '__EMPTY__') {
|
|
|
+ $query->where(function ($q) {
|
|
|
+ $q->whereNull('客户编号')->whereOr('客户编号', '');
|
|
|
+ });
|
|
|
+ } elseif ($customerCode) {
|
|
|
$query->where('客户编号', $customerCode);
|
|
|
}
|
|
|
|
|
|
@@ -93,7 +97,7 @@ class MonthlyGarments extends Api
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- $results = $query->order('Sys_rq DESC')->select();
|
|
|
+ $results = $query->order('UniqId DESC')->select();
|
|
|
|
|
|
$this->success('成功', [
|
|
|
'result' => $results,
|