From 1340b6f7bedfa88218cc5e1a00b3eb2a0bd0309e Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期四, 28 九月 2023 15:17:15 +0800
Subject: [PATCH] 报表功能开发
---
response/report_forms_response.go | 18 +++++++++---------
controllers/report_forms_controller.go | 5 +++--
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/controllers/report_forms_controller.go b/controllers/report_forms_controller.go
index d9ea817..db62c73 100644
--- a/controllers/report_forms_controller.go
+++ b/controllers/report_forms_controller.go
@@ -134,7 +134,7 @@
for _, detail := range details {
operationIds = append(operationIds, detail.OperationID)
}
- //鑾峰彇鎿嶄綔璁板綍
+ //鑾峰彇宸插畬鎴愮殑鎿嶄綔璁板綍
operations, err := models.NewOperationSearch().SetIds(operationIds).SetStatus(constvar.OperationStatus_Finish).FindNotTotal()
if err != nil {
util.ResponseFormat(c, code.RequestParamError, "鏌ヨ鎿嶄綔璁板綍澶辫触")
@@ -145,11 +145,12 @@
var resp response.InventoryHistory
resp.Amount = detail.Amount
resp.Unit = params.Unit
+ resp.ProductName = params.ProductName
for _, operation := range operations {
if detail.OperationID == operation.Id {
resp.Number = operation.Number
resp.Date = operation.UpdateTime
- resp.BaseOperationType = operation.BaseOperationType
+ resp.Status = "瀹屾垚"
resp.ContactedName = operation.ContacterName
resp.FromLocation = operation.FromLocation.Name
resp.ToLocation = operation.ToLocation.Name
diff --git a/response/report_forms_response.go b/response/report_forms_response.go
index 63ee819..8bf283c 100644
--- a/response/report_forms_response.go
+++ b/response/report_forms_response.go
@@ -2,7 +2,6 @@
import (
"github.com/shopspring/decimal"
- "wms/constvar"
)
type InventoryForms struct {
@@ -19,14 +18,15 @@
}
type InventoryHistory struct {
- Number string `json:"number"` //鍗曞彿
- Date string `json:"date"` //鏃ユ湡
- FromLocation string `json:"fromLocation"` //婧愪綅缃�
- ToLocation string `json:"toLocation"` //鐩爣浣嶇疆
- Amount decimal.Decimal `json:"amount"` //鏁伴噺
- Unit string `json:"unit"` //鍗曚綅
- ContactedName string `json:"contactedName"` //瀹屾垚鑰�
- BaseOperationType constvar.BaseOperationType `json:"baseOperationType"` //鍩虹浣滀笟绫诲瀷
+ Number string `json:"number"` //鍗曞彿
+ Date string `json:"date"` //鏃ユ湡
+ ProductName string `json:"productName"` //浜у搧鍚嶇О
+ FromLocation string `json:"fromLocation"` //婧愪綅缃�
+ ToLocation string `json:"toLocation"` //鐩爣浣嶇疆
+ Amount decimal.Decimal `json:"amount"` //鏁伴噺
+ Unit string `json:"unit"` //鍗曚綅
+ ContactedName string `json:"contactedName"` //瀹屾垚鑰�
+ Status string `json:"status"` //鐘舵��
}
type LocationForms struct {
--
Gitblit v1.8.0