From 254fe5c1f9e54ea33269a39c9c25f66c4d27e6d5 Mon Sep 17 00:00:00 2001 From: lishihai <dslsh@dscom> Date: 星期四, 13 六月 2024 15:26:42 +0800 Subject: [PATCH] 概述(一级模块)-入库(二级模块)-新建操作(含出入库,内部调拨)的人可以删除自己创建的,不能删除别人创建的:删除时验证创建人 --- controllers/operation_type.go | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/controllers/operation_type.go b/controllers/operation_type.go index c0ea4a9..5faabe7 100644 --- a/controllers/operation_type.go +++ b/controllers/operation_type.go @@ -141,6 +141,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 +176,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 +208,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