mh_goadmin_server/app/admin/apis/decision/decision.go
chenlin f754f9ccd2 开发v1.4.1需求:
(1)优化采购需求接口,增加入参区分店员和采购视角;
(2)优化供应商接口,开户行改成列表;
2024-06-14 15:15:39 +08:00

38 lines
992 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package decision
import (
"errors"
"github.com/gin-gonic/gin"
model "go-admin/app/admin/models"
"go-admin/logger"
"go-admin/tools/app"
"net/http"
)
// ErpDecisionReport 进销存报表
// @Summary 进销存报表
// @Tags 决策中心V1.4.0
// @Produce json
// @Accept json
// @Param request body models.ErpDecisionReportReq true "进销存报表模型"
// @Success 200 {object} models.ErpDecisionReportResp
// @Router /api/v1/decision/report [post]
func ErpDecisionReport(c *gin.Context) {
req := new(model.ErpDecisionReportReq)
if err := c.ShouldBindJSON(&req); err != nil {
logger.Error("ShouldBindJSON err:", logger.Field("err", err))
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误"+err.Error())
return
}
resp, err := req.DecisionReportList(c)
if err != nil {
//logger.Error("erp commodity list err:", err)
app.Error(c, http.StatusInternalServerError, err, "查询失败:"+err.Error())
return
}
app.OK(c, resp, "OK")
return
}