|
|
@@ -26,6 +26,19 @@ class StockWastageOrderClass extends BaseClass
|
|
|
const WASTAGE_TYPE_COMMON = 0;
|
|
|
const WASTAGE_TYPE_WORK = 1;
|
|
|
|
|
|
+ //当天报损数量 ssh 20220724
|
|
|
+ public static function getTodayWaste($mainId)
|
|
|
+ {
|
|
|
+ $todayDate = date('Y-m-d');
|
|
|
+ $todayStartTime = $todayDate . ' 00:00:00';
|
|
|
+ $todayEndTime = $todayDate . ' 23:59:59';
|
|
|
+ $where = ['mainId' => $mainId];
|
|
|
+ $where['payTime'] = ['between', [$todayStartTime, $todayEndTime]];
|
|
|
+ $wastage = StockWastageOrderItemClass::sum($where, 'itemNum');
|
|
|
+ $wastage = $wastage === null ? 0 : $wastage;
|
|
|
+ return $wastage;
|
|
|
+ }
|
|
|
+
|
|
|
// 订单列表
|
|
|
public static function getOrderList($where)
|
|
|
{
|