diff --git a/DOAN.Admin.WebApi/Controllers/MES/mm/line/MmLineInventoryController.cs b/DOAN.Admin.WebApi/Controllers/MES/mm/line/MmLineInventoryController.cs index d4c16dc..70bf650 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/mm/line/MmLineInventoryController.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/mm/line/MmLineInventoryController.cs @@ -102,19 +102,18 @@ namespace DOAN.WebApi.Controllers.MES.mm.line } - // /// - // /// 入库 - // /// - // /// - // [HttpPost("putInLineMaterial")] - // [AllowAnonymous] - // public IActionResult putInLineMaterial([FromBody] string LineCode, string MaterialCode, string BatchCode, string LocationCode, int Quantity) - //{ - // var response = _MmLineInventoryService.putInLineMaterial(LineCode, MaterialCode, BatchCode, LocationCode,Quantity); + /// + /// 盘点 + /// + /// + [HttpGet("stocktakeLineMaterial")] + [AllowAnonymous] + public IActionResult putInLineMaterial([FromQuery] string Id, decimal newStocktakingNum) + { + var response = _MmLineInventoryService.stocktakeLineMaterial(Id, newStocktakingNum); + var info = response.Adapt(); + return SUCCESS(info); + } - // var info = response.Adapt(); - // return SUCCESS(info); - //} - - } + } } \ No newline at end of file diff --git a/DOAN.Service/MES/mm/line/MmLineInventoryService.cs b/DOAN.Service/MES/mm/line/MmLineInventoryService.cs index 8cc5808..7a7dd76 100644 --- a/DOAN.Service/MES/mm/line/MmLineInventoryService.cs +++ b/DOAN.Service/MES/mm/line/MmLineInventoryService.cs @@ -339,6 +339,8 @@ namespace DOAN.Service.MES.mm.line decimal begin = mmLineInventory.Quantity.Value; mmLineInventory.Quantity = Quantity; mmLineInventory.Updatetime = DateTime.Now; + mmLineInventory.LastStocktakingNum=Quantity; + mmLineInventory.LastStocktakingTime = DateTime.Now; mmLineInventory.Updateby = "系统"; result = Context.Updateable(mmLineInventory).ExecuteCommand(); if (result == 1)