fix
zhangqian
2024-07-04 e7bc8bbe2fd47b348090552665233731d98fbaec
service/warehouse_month_forms.go
@@ -162,7 +162,7 @@
   return
}
func GetCurrentWarehouseStats(date string, warehouseId int, productIds []string) (statRecords []*models.WarehouseMonthStats, err error) {
func GetCurrentWarehouseStats(date string, warehouseId int, productIds []string, realTime bool) (statRecords []*models.WarehouseMonthStats, err error) {
   //本月期初数量/上月结余数量
   groupSumList, err := models.NewLocationProductAmountSearch().SetProductIds(productIds).GroupSum("product_id", "amount")
   productIds = make([]string, 0, len(groupSumList))
@@ -178,6 +178,10 @@
   //按配置取开始时间和结束时间
   beginTime, endTime, err := NewSystemConfigService().GetInventoryCutOffTime()
   if realTime {
      beginTime = endTime
      endTime = time.Now()
   }
   if err != nil {
      logx.Errorf("MonthStats GetCurrentStats get GetInventoryCutOffTime err:%v", err)
      return