public async Task <ActionResult> Update(string id, [FromBody] GoodsDeliveryNoteMeta goodsDeliveryNoteMeta) { goodsDeliveryNoteMeta.TenantId = CurrentUser.TenantId; goodsDeliveryNoteMeta.LastUpdateUserId = CurrentUser.Id; goodsDeliveryNoteMeta.LastUpdateFullName = CurrentUser.FullName; goodsDeliveryNoteMeta.LastUpdateUserAvatar = CurrentUser.Avatar; var result = await _goodsDeliveryNoteService.Update(id, goodsDeliveryNoteMeta, CurrentUser.Id, CurrentUser.FullName, CurrentUser.Avatar); if (result.Code <= 0) { return(BadRequest(result)); } return(Ok(result)); }
public async Task <ActionResult> Insert([FromBody] GoodsDeliveryNoteMeta goodsDeliveryNoteMeta) { goodsDeliveryNoteMeta.TenantId = CurrentUser.TenantId; goodsDeliveryNoteMeta.CreatorId = CurrentUser.Id; goodsDeliveryNoteMeta.CreatorFullName = CurrentUser.FullName; goodsDeliveryNoteMeta.CreatorAvatar = CurrentUser.Avatar; var result = await _goodsDeliveryNoteService.Insert(goodsDeliveryNoteMeta, CurrentUser.Id, CurrentUser.FullName, CurrentUser.Avatar); if (result.Code <= 0) { return(BadRequest(result)); } return(Ok(result)); }