成品入库

This commit is contained in:
卢江海 2025-03-31 15:56:38 +08:00
parent 2d36fddadc
commit bd89356c8f
2 changed files with 15 additions and 14 deletions

View File

@ -102,19 +102,18 @@ namespace DOAN.WebApi.Controllers.MES.mm.line
}
// /// <summary>
// /// 入库
// /// </summary>
// /// <returns></returns>
// [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);
/// <summary>
/// 盘点
/// </summary>
/// <returns></returns>
[HttpGet("stocktakeLineMaterial")]
[AllowAnonymous]
public IActionResult putInLineMaterial([FromQuery] string Id, decimal newStocktakingNum)
{
var response = _MmLineInventoryService.stocktakeLineMaterial(Id, newStocktakingNum);
var info = response.Adapt<MmLineInventory>();
return SUCCESS(info);
}
// var info = response.Adapt<MmLineInventory>();
// return SUCCESS(info);
//}
}
}
}

View File

@ -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)