From ec58bf196fb360bfcec35ed784ae9da90ffa3d42 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期二, 12 十二月 2023 11:06:50 +0800
Subject: [PATCH] 调整listbycondition接口服务

---
 models/operation.go |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/models/operation.go b/models/operation.go
index 7a62987..d076b88 100644
--- a/models/operation.go
+++ b/models/operation.go
@@ -2,6 +2,7 @@
 
 import (
 	"fmt"
+	"github.com/shopspring/decimal"
 	"gorm.io/gorm"
 	"wms/constvar"
 	"wms/pkg/mysqlx"
@@ -27,9 +28,20 @@
 		CompanyID         int                      `json:"companyID" gorm:"type:int;comment:鍏徃ID-瀹㈡埛"`
 		CompanyName       string                   `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О-瀹㈡埛"`
 		Comment           string                   `json:"comment" gorm:"type:text;comment:澶囨敞"`
+		LogisticCompanyId string                   `json:"logisticCompanyId"   gorm:"type:varchar(191);comment:鐗╂祦鍏徃id"`
+		LogisticCompany   LogisticCompany          `json:"logisticCompany"      gorm:"foreignKey:LogisticCompanyId"`
+		WaybillNumber     string                   `json:"waybillNumber" gorm:"type:varchar(255);comment:杩愬崟鍙�"`    //杩愬崟鍙�
+		Weight            decimal.Decimal          `gorm:"type:decimal(20,2);comment:閲嶉噺" json:"weight"`           //閲嶉噺
+		LogisticWeight    decimal.Decimal          `gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺" json:"logisticWeight"` //鐗╂祦閲嶉噺
+		Source            string                   `json:"source" gorm:"type:varchar(255);comment:鏉ユ簮绯荤粺,鐢ㄤ簬杩斿洖淇敼鐘舵��"`
 
 		Details           []*OperationDetails        `json:"details" gorm:"foreignKey:OperationID;references:Id"`
 		BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:鍩虹浣滀笟绫诲瀷"` //鍩虹浣滀笟绫诲瀷
+
+		AuditDate     string `json:"auditDate" gorm:"type:varchar(31);comment:瀹℃壒鏃堕棿"`
+		ReceiverName  string `json:"receiverName" gorm:"type:varchar(31);comment:鏀惰揣浜哄鍚�"`
+		ReceiverPhone string `json:"receiverPhone" gorm:"type:varchar(31);comment:鑱旂郴鐢佃瘽"`
+		ReceiverAddr  string `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"`
 	}
 
 	OperationSearch struct {
@@ -42,6 +54,7 @@
 		Preload  bool
 		Disuse   bool
 		Ids      []int
+		Numbers  []string
 	}
 )
 
@@ -145,7 +158,7 @@
 	}
 
 	if slf.Preload {
-		db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("FromLocation").Preload("ToLocation")
+		db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("LogisticCompany").Preload("FromLocation").Preload("ToLocation")
 	}
 
 	if slf.Disuse {

--
Gitblit v1.8.0