Ver código fonte

提交删除的日志统计

lvhao 1 dia atrás
pai
commit
ea43edba9f
1 arquivos alterados com 25 adições e 0 exclusões
  1. 25 0
      core/CoreApp/controllers/Whlabel.php

+ 25 - 0
core/CoreApp/controllers/Whlabel.php

@@ -4348,6 +4348,20 @@ class Whlabel extends Start_Controller
 			if ($type != 3 && $type != 5) {
 				if ($type == 1 || $type == 4) {
 					$info_list = $this->whlabel->find_all($where, 'warehouse,purchase,sku,title,features,label,orderinfo,waybill,outk', $order_str);
+
+
+					$three_month = strtotime('-3 months');
+					$info_list_d = $this->whlabelscbf->find_all($where." and del_time > ".$three_month, 'warehouse,purchase,sku,title,features,label,orderinfo,waybill,outk', $order_str);
+					
+					$info_list_d = array_map(function ($item) {
+						unset($item['del_time']);   // 删除 age 字段
+						return $item;
+					}, $info_list_d);
+
+
+					$info_list = array_merge($info_list, $info_list_d);
+
+
 					foreach ($info_list as $key => $value) {
 						$info_list[$key]['purchase'] = (isset($prc[$value['purchase']])) ? $prc[$value['purchase']] : '未知';
 						$info_list[$key]['outk'] = date('Y-m-d H:i:s', $value['outk']); //减12调整美国时间
@@ -4485,6 +4499,17 @@ class Whlabel extends Start_Controller
 				$this->excelxh->get_fz2($final_list, $titlename, $filename, $tail);
 			} else if ($type == 5) {
 				$info_list = $this->whlabel->find_all($where, 'warehouse,purchase,sku,title,features,label,outk', $order_str);
+
+				$three_month = strtotime('-3 months');
+				$info_list_d = $this->whlabelscbf->find_all($where." and del_time > ".$three_month, 'warehouse,purchase,sku,title,features,label,outk', $order_str);
+				
+				$info_list_d = array_map(function ($item) {
+					unset($item['del_time']);   // 删除 age 字段
+					return $item;
+				}, $info_list_d);
+
+
+				$info_list = array_merge($info_list, $info_list_d);
 				
 				foreach ($info_list as $key => $value) {
 					$info_list[$key]['purchase'] = (isset($prc[$value['purchase']])) ? $prc[$value['purchase']] : '未知';