From 9c7551a7a752c07db11b0fd23bfba8da1ad062e0 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 21 六月 2024 20:39:12 +0800
Subject: [PATCH] fix 404
---
controllers/operation_type.go | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/controllers/operation_type.go b/controllers/operation_type.go
index c0ea4a9..9b0525e 100644
--- a/controllers/operation_type.go
+++ b/controllers/operation_type.go
@@ -116,7 +116,12 @@
util.ResponseFormat(c, code.RequestParamError, err.Error())
return
}
- list, total, err := models.NewOperationTypeSearch().SetPage(params.Page, params.PageSize).SetKeyword(params.Keyword).SetOrder("id desc").SetPreload(true).Find()
+ list, total, err := models.NewOperationTypeSearch().
+ SetPage(params.Page, params.PageSize).
+ SetKeyword(params.Keyword).
+ SetOrder("id desc").
+ SetWarehouseId(params.WarehouseId).
+ SetPreload(true).Find()
if err != nil {
util.ResponseFormat(c, code.RequestError, "鏌ユ壘澶辫触")
return
@@ -140,6 +145,9 @@
}
if value, ok := mapStatistics[strconv.Itoa(v.Id)+string(constvar.OperationStatus_Finish)]; ok {
list[k].FinishCount = value.Count
+ }
+ if value, ok := mapStatistics[strconv.Itoa(v.Id)+string(constvar.OperationStatus_Cancel)]; ok {
+ list[k].CancelCount = value.Count
}
}
util.ResponseFormatListWithPage(c, code.Success, list, cast.ToInt(total), params.Page, params.PageSize)
@@ -173,7 +181,7 @@
// @Produce application/json
// @Param object query request.ListTransfer true "鏌ヨ鍙傛暟"
// @Success 200 {object} util.ResponseList "鎴愬姛"
-// @Router /api-wms/v1/operationType/operationType [get]
+// @Router /api-wms/v1/operationType/listTransfer [get]
func (slf OperationTypeController) ListTransfer(c *gin.Context) {
var params request.GetOperationTypeList
if err := c.ShouldBindQuery(¶ms); err != nil {
@@ -205,6 +213,9 @@
if value, ok := mapStatistics[strconv.Itoa(v.Id)+string(constvar.OperationStatus_Finish)]; ok {
list[k].FinishCount = value.Count
}
+ if value, ok := mapStatistics[strconv.Itoa(v.Id)+string(constvar.OperationStatus_Cancel)]; ok {
+ list[k].FinishCount = value.Count
+ }
}
util.ResponseFormatListWithPage(c, code.Success, list, cast.ToInt(total), params.Page, params.PageSize)
}
--
Gitblit v1.8.0