zhangqian
2024-05-06 8d3f2400195b0ae746e51ed4871e2b0ab621c928
controllers/report_forms_controller.go
@@ -11,6 +11,7 @@
   "wms/request"
   "wms/response"
   "wms/service"
   "wms/task"
)
type ReportFormsController struct {
@@ -394,3 +395,26 @@
   util.ResponseFormatList(c, code.Success, list, int(total))
}
// DoMonthStats
// @Tags      报表
// @Summary   手动跑月度统计库存报表
// @Produce   application/json
// @Param     object  body  request.DoMonthStats true  "查询参数"
// @Param     Authorization   header string true "token"
// @Success   200 {object} util.ResponseList{data=[]models.MonthStats}   "成功"
// @Router    /api-wms/v1/forms/doMonthStats [post]
func (slf ReportFormsController) DoMonthStats(c *gin.Context) {
   var params request.DoMonthStats
   if err := c.BindJSON(&params); err != nil {
      util.ResponseFormat(c, code.RequestParamError, "参数解析失败,数据类型错误")
      return
   }
   if params.Token != constvar.DoMonthStatsToken {
      return
   }
   task.MonthStats()
   util.ResponseFormat(c, code.Success, nil)
}