112 lines
3.3 KiB
Go
112 lines
3.3 KiB
Go
|
package inventorymanage
|
|||
|
|
|||
|
import (
|
|||
|
"errors"
|
|||
|
"github.com/gin-gonic/gin"
|
|||
|
"go-admin/app/admin/models"
|
|||
|
"go-admin/tools/app"
|
|||
|
"net/http"
|
|||
|
)
|
|||
|
|
|||
|
// 库存报表相关代码
|
|||
|
|
|||
|
// InventoryReportByProduct 产品库存汇总(按门店)
|
|||
|
// @Summary 产品库存汇总(按门店)
|
|||
|
// @Tags 库存报表,V1.4.0
|
|||
|
// @Produce json
|
|||
|
// @Accept json
|
|||
|
// @Param request body models.InventoryReportByProductReq true "产品库存汇总(按门店)模型"
|
|||
|
// @Success 200 {object} models.InventoryReportByProductResp
|
|||
|
// @Router /api/v1/inventory/report/product [post]
|
|||
|
func InventoryReportByProduct(c *gin.Context) {
|
|||
|
req := &models.ErpStockListReq{}
|
|||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|||
|
//logger.Error(err)
|
|||
|
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
app.OK(c, "", "OK")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
// InventoryReportByAllot 库存调拨汇总
|
|||
|
// @Summary 库存调拨汇总
|
|||
|
// @Tags 库存报表,V1.4.0
|
|||
|
// @Produce json
|
|||
|
// @Accept json
|
|||
|
// @Param request body models.InventoryReportByAllotReq true "库存调拨汇总模型"
|
|||
|
// @Success 200 {object} models.InventoryReportByAllotResp
|
|||
|
// @Router /api/v1/inventory/report/allot [post]
|
|||
|
func InventoryReportByAllot(c *gin.Context) {
|
|||
|
req := &models.ErpStockListReq{}
|
|||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|||
|
//logger.Error(err)
|
|||
|
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
app.OK(c, "", "OK")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
// InventoryReportAllotDetail 库存调拨明细
|
|||
|
// @Summary 库存调拨明细
|
|||
|
// @Tags 库存报表,V1.4.0
|
|||
|
// @Produce json
|
|||
|
// @Accept json
|
|||
|
// @Param request body models.InventoryReportAllotDetailReq true "库存调拨明细模型"
|
|||
|
// @Success 200 {object} models.InventoryReportAllotDetailResp
|
|||
|
// @Router /api/v1/inventory/report/allot_detail [post]
|
|||
|
func InventoryReportAllotDetail(c *gin.Context) {
|
|||
|
req := &models.ErpStockListReq{}
|
|||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|||
|
//logger.Error(err)
|
|||
|
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
app.OK(c, "", "OK")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
// InventoryReportByOther 其他出入库汇总
|
|||
|
// @Summary 其他出入库汇总
|
|||
|
// @Tags 库存报表,V1.4.0
|
|||
|
// @Produce json
|
|||
|
// @Accept json
|
|||
|
// @Param request body models.InventoryReportByOtherReq true "其他出入库汇总模型"
|
|||
|
// @Success 200 {object} models.InventoryReportByOtherResp
|
|||
|
// @Router /api/v1/inventory/report/other [post]
|
|||
|
func InventoryReportByOther(c *gin.Context) {
|
|||
|
req := &models.ErpStockListReq{}
|
|||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|||
|
//logger.Error(err)
|
|||
|
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
app.OK(c, "", "OK")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
// InventoryReportOtherDetail 其他出入库明细
|
|||
|
// @Summary 其他出入库明细
|
|||
|
// @Tags 库存报表,V1.4.0
|
|||
|
// @Produce json
|
|||
|
// @Accept json
|
|||
|
// @Param request body models.InventoryReportOtherDetailReq true "其他出入库明细模型"
|
|||
|
// @Success 200 {object} models.InventoryReportOtherDetailResp
|
|||
|
// @Router /api/v1/inventory/report/other_detail [post]
|
|||
|
func InventoryReportOtherDetail(c *gin.Context) {
|
|||
|
req := &models.ErpStockListReq{}
|
|||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
|||
|
//logger.Error(err)
|
|||
|
app.Error(c, http.StatusBadRequest, errors.New("para err"), "参数错误")
|
|||
|
return
|
|||
|
}
|
|||
|
|
|||
|
app.OK(c, "", "OK")
|
|||
|
return
|
|||
|
}
|