2026-03-18 10:18:03 +08:00
|
|
|
|
// 库存预警历史控制器
|
|
|
|
|
|
// 职责:预警历史查询、删除(无Create/Update,由系统自动归档)
|
|
|
|
|
|
// 调用服务:service.InventoryWarningHistory
|
|
|
|
|
|
// 注意:Delete返回*beans.ResponseEmpty,直接return
|
|
|
|
|
|
package controller
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
dto "assets/model/dto/stock"
|
|
|
|
|
|
service "assets/service/stock"
|
|
|
|
|
|
"context"
|
|
|
|
|
|
|
2026-06-10 15:40:17 +08:00
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
2026-03-18 10:18:03 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type inventoryWarningHistory struct{}
|
|
|
|
|
|
|
|
|
|
|
|
var InventoryWarningHistory = new(inventoryWarningHistory)
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *inventoryWarningHistory) GetInventoryWarningHistory(ctx context.Context, req *dto.GetInventoryWarningHistoryReq) (res *dto.GetInventoryWarningHistoryRes, err error) {
|
|
|
|
|
|
return service.InventoryWarningHistory.GetOne(ctx, req)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *inventoryWarningHistory) ListInventoryWarningHistories(ctx context.Context, req *dto.ListInventoryWarningHistoryReq) (res *dto.ListInventoryWarningHistoryRes, err error) {
|
|
|
|
|
|
return service.InventoryWarningHistory.List(ctx, req)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (c *inventoryWarningHistory) DeleteInventoryWarningHistory(ctx context.Context, req *dto.DeleteInventoryWarningHistoryReq) (res *beans.ResponseEmpty, err error) {
|
|
|
|
|
|
err = service.InventoryWarningHistory.Delete(ctx, req)
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|