using Microsoft.AspNetCore.Mvc; using DOAN.Model.Dto; using DOAN.Admin.WebApi.Filters; using DOAN.Model.MES.mm; using DOAN.Model.MES.mm.Dto; using DOAN.Service.MES.mm.IService; using Infrastructure.Converter; using MapsterMapper; namespace DOAN.Admin.WebApi.Controllers { /// /// 线边库盘点 /// [Verify] [Route("mes/materialManagement/MmLinesidebarInventoryCheck")] public class MmLinesidebarInventoryCheckController: BaseController { private readonly IMmLinesidebarInventoryCheckService _mmLinesidebarInventoryCheckService; public MmLinesidebarInventoryCheckController(IMmLinesidebarInventoryCheckService mmLinesidebarInventoryCheckService) { this._mmLinesidebarInventoryCheckService = mmLinesidebarInventoryCheckService; } //TODO 查询盘点记录 [HttpGet("list")] public IActionResult QueryMmLinesidebarInventory([FromQuery] MmInventoryCheckLogQueryDto parm) { var response = _mmLinesidebarInventoryCheckService.GetList(parm); return SUCCESS(response); } //TODO 校正 [HttpGet("correcting")] public IActionResult Correcting(string id) { if (string.IsNullOrEmpty(id)) throw new CustomException("id is empty"); var response = _mmLinesidebarInventoryCheckService.Correcting(id); return SUCCESS(response); } //TODO 修改 [HttpPut] [Log(Title = "线边库库存盘点", BusinessType = BusinessType.UPDATE)] public IActionResult UpdateMmLinesidebarInventoryCheck([FromBody] MmInventoryCheckLogDto parm) { var modal = parm.Adapt().ToUpdate(HttpContext); var response = _mmLinesidebarInventoryCheckService.UpdateMmInventoryCheckLog(modal); return ToResponse(response); } } }