From 5aeb61e49e9e518108fec4aeb6fdd460f21cdbfe Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 14 九月 2023 13:59:24 +0800
Subject: [PATCH] 解决冲突

---
 constvar/const.go |  102 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 94 insertions(+), 8 deletions(-)

diff --git a/constvar/const.go b/constvar/const.go
index f5a9589..dff496d 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -1,17 +1,17 @@
 package constvar
 
-type BaseJobType int
+type BaseOperationType int
 
 const (
-	BaseJobTypeIncoming BaseJobType = iota + 1 //鏀惰揣
-	BaseJobTypeOutgoing                        //浜よ揣
-	BaseJobTypeInternal                        //鍐呴儴璋冩嫧
+	BaseOperationTypeIncoming BaseOperationType = iota + 1 //鏀惰揣
+	BaseOperationTypeOutgoing                              //浜よ揣
+	BaseOperationTypeInternal                              //鍐呴儴璋冩嫧
 )
 
-func (slf BaseJobType) IsValid() bool {
-	return slf == BaseJobTypeIncoming ||
-		slf == BaseJobTypeOutgoing ||
-		slf == BaseJobTypeInternal
+func (slf BaseOperationType) IsValid() bool {
+	return slf == BaseOperationTypeIncoming ||
+		slf == BaseOperationTypeOutgoing ||
+		slf == BaseOperationTypeInternal
 }
 
 type ReservationMethod int
@@ -41,3 +41,89 @@
 		slf == WhetherTypeAlways ||
 		slf == ReservationNever
 }
+
+// ProductType 浜у搧绫诲瀷
+type ProductType int
+
+const (
+	ProductTypeRaw      = iota + 1 // 鍘熸潗鏂�
+	ProductTypeSemi                // 鍗婃垚鍝�
+	ProductTypeFinished            // 鎴愬搧
+)
+
+type ProductStatus int
+
+const (
+	ProductStatusCreate   ProductStatus = iota // 鏂板缓
+	ProductStatusActive                        // 鍚敤
+	ProductStatusInactive = -1                 // 鍋滅敤
+)
+
+// PurchaseType 閲囪喘绫诲瀷
+type PurchaseType int
+
+const (
+	PurchaseTypeOutSource PurchaseType = iota + 1 // 閲囪喘
+	PurchaseTypeSelf                              // 鑷埗
+	PurchaseTypeEntrust                           // 濮斿
+)
+
+func (t PurchaseType) Valid() bool {
+	if t < PurchaseTypeOutSource ||
+		t > PurchaseTypeEntrust {
+		return false
+	}
+	return true
+}
+
+// LocationType 浣嶇疆绫诲瀷
+type LocationType int
+
+const (
+	LocationTypeVendor        LocationType = iota + 1 // 渚涘簲鍟嗕綅缃�
+	LocationTypeView                                  // 瑙嗗浘
+	LocationTypeInternal                              // 鍐呴儴浣嶇疆
+	LocationTypeCustomer                              // 瀹㈡埛浣嶇疆
+	LocationTypeInventoryLoss                         // 搴撳瓨鎹熷け
+	LocationTypeProduction                            // 鐢熶骇
+	LocationTypeTransit                               // 涓浆浣嶇疆
+)
+
+func (t LocationType) Valid() bool {
+	return t >= LocationTypeVendor && t <= LocationTypeTransit
+}
+
+type ForceRemovalStrategy int
+
+const (
+	ForceRemovalStrategyFIFO ForceRemovalStrategy = iota + 1
+	ForceRemovalStrategyLIFO
+	ForceRemovalStrategyClosestLocation
+)
+
+func (t ForceRemovalStrategy) Valid() bool {
+	return t >= ForceRemovalStrategyFIFO && t <= ForceRemovalStrategyClosestLocation
+}
+
+type CostingMethod int
+
+const (
+	CostingMethodStandardPrice CostingMethod = iota + 1 //鏍囧噯浠锋牸
+	CostingMethodFIFO                                   //鍏堣繘鍏堝嚭
+	CostingMethodAverageCost                            //
+)
+
+func (t CostingMethod) Valid() bool {
+	return t >= CostingMethodStandardPrice && t <= CostingMethodAverageCost
+}
+
+type InventoryValuation int
+
+const (
+	InventoryValuationManual InventoryValuation = iota + 1 //鎵嬪姩
+	InventoryValuationAuto                                 //鑷姩
+)
+
+func (t InventoryValuation) Valid() bool {
+	return t >= InventoryValuationManual && t <= InventoryValuationAuto
+}

--
Gitblit v1.8.0