stock get_month debug params3

This commit is contained in:
qianhy
2023-03-14 16:11:01 +08:00
committed by lccsw
parent 2845c9fb45
commit 4d5fb6725d
+4 -4
View File
@@ -195,7 +195,7 @@ class Stock extends HD_Controller
foreach ($dateMonths as $v2) {
$where2 = $where3 = ['biz_id' => $v['id'], 'log_date>=' => $v2['firstDay'], 'log_date<=' => $v2['lastDay']];
$res_log = $this->mdStockLog->select_groupby('s_id', $where2, 'id desc', 0, 0, 'brand_id,s_id');
$data = '';
$data_month = '';
if ($res_log) {
$str_ids = implode(',', array_unique(array_column($res_log, 'brand_id')));
$map_brand = $this->mdAutoBrand->map('id', 'name', ["id in ({$str_ids})" => null]);
@@ -207,13 +207,13 @@ class Stock extends HD_Controller
, "count(id) as total");
$count = $res_log2 ? $res_log2[0]['total'] : 0;
$title = "{$map_brand[$v3['brand_id']]}-{$map_sery[$v3['s_id']]} {$count}";
$data = $data ? $data . '' . $title : $title;
$data_month = $data_month ? $data_month . '' . $title : $title;
}
}
if ($params['export'] == 1) {
$months[$v2['name']] = $data;
$months[$v2['name']] = $data_month;
} else {
$months[] = ['name' => $v2['name'], 'data' => $data];
$months[] = ['name' => $v2['name'], 'data' => $data_month];
}
}
if ($params['export'] == 1) {