public IActionResult DeletePurchasingOrderProduct(int purchasingOrderId, int productId) { //权限 if (!_permissionService.Authorize("DeletePurchasingOrderProducts")) { return(Error("没有此权限!")); } //日志 #region 除商品 var data = _purchasingService.GetPurchasingProductById(purchasingOrderId, productId); var purchasingOrder = _purchasingService.GetPurchasingById(purchasingOrderId); var productData = _productService.GetProductById(productId); var mark = "删除商品:[" + productData.Name + "] 数量:[" + data.Quantity + "]"; #endregion if (_purchasingService.DeletePurchasingOrderProduct(purchasingOrderId, productId)) { _logService.InsertOrderTableLog("PurchasingProducts", purchasingOrderId, "删除商品", Convert.ToInt32(purchasingOrder.State), mark); return(Success()); } else { return(Error()); } }