fix
zhangqian
2024-07-04 c6b26991704713d4a4d88e520759f02cd337219f
controllers/report_forms_controller.go
@@ -444,7 +444,7 @@
// @Produce   application/json
// @Param     object  body  request.GetMonthStats true  "查询参数"
// @Param     Authorization   header string true "token"
// @Success   200 {object} util.ResponseList{data=[]models.MonthStats}   "成功"
// @Success   200 {object} util.ResponseList{data=[]models.WarehouseMonthStats}   "成功"
// @Router    /api-wms/v1/forms/warehouseMonthStats [post]
func (slf ReportFormsController) WarehouseMonthStats(c *gin.Context) {
   var params request.GetMonthStats
@@ -475,12 +475,8 @@
      return
   }
   now := time.Now().Local()
   today := now.Day()
   nowMonth := now.Format("2006-01")
   day, dateStr, _ := service.NewSystemConfigService().GetInventoryCutOffPoint()
   if nowMonth == params.Date && today < day || today == day && now.Format("15:04") < dateStr { //本月未至结算时间点
   nowMonth := time.Now().Local().Format("2006-01")
   if nowMonth == params.Date {
      productIds := make([]string, 0, len(result))
      for _, item := range result {
         productIds = append(productIds, item.ProductId)
@@ -551,6 +547,7 @@
      return
   }
   params.Preload = true
   monthFormsService := service.NewWarehouseMonthFormsService()
   list, err := monthFormsService.FetchAll(params)
   if err != nil {