animeic 2 years ago
parent
commit
29f52529a8
2 changed files with 6 additions and 6 deletions
  1. 3 3
      boxcost/api/plan.go
  2. 3 3
      boxcost/api/supplier.go

+ 3 - 3
boxcost/api/plan.go

@@ -96,15 +96,15 @@ func PlanAllocBatch(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 		// 采购
 		billId, _ := primitive.ObjectIDFromHex(tidArr[1])
 		if tidArr[0] == "1" {
-			repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()})
+			repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()})
 		}
 		// 工艺
 		if tidArr[0] == "2" {
-			repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()})
+			repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()})
 		}
 		// 成品采购
 		if tidArr[0] == "3" {
-			repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()})
+			repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()})
 		}
 
 	}

+ 3 - 3
boxcost/api/supplier.go

@@ -67,11 +67,11 @@ func SupplierBillAlloc(c *gin.Context, apictx *ApiSession) (interface{}, error)
 
 	switch billType {
 	case "purchase":
-		return repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()})
+		return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()})
 	case "produce":
-		return repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()})
+		return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()})
 	case "product":
-		return repo.RepoUpdateSetDocProps(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()})
+		return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()})
 	default:
 		return true, nil
 	}