Exemple #1
0
 public IActionResult AddSupplier(Supplier supplier)
 {
     if (!_permissionService.Authorize("AddSupplier"))
     {
         return(Error("没有此权限!"));
     }
     supplier.SupplierName = supplier.SupplierName.Trim();
     if (supplier.SupplierName != null && _purchasingService.ComfirmSupplierIsExist(supplier.SupplierName) == null)
     {
         _purchasingService.AddSupplier(supplier);
     }
     else
     {
         return(Error("已有此供应商!"));
     }
     //将供应商数据传递到WMS进行更新
     _scheduleTaskFuncService.OmsSyncSuppliers();
     return(Success());
 }