You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using SlnMesnac.Model.domain;
|
|
using SlnMesnac.Repository.service;
|
|
|
|
namespace SlnMesnac.Controllers;
|
|
|
|
/// <summary>
|
|
/// 扫描下线成品记录
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class ProductOfflineController:ControllerBase
|
|
{
|
|
private readonly IProductOfflineService _service;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="service"></param>
|
|
public ProductOfflineController(IProductOfflineService service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取成品下线扫描记录
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public IEnumerable<ProductOffline> Get()
|
|
{
|
|
_service.GetProductInfos(out var info);
|
|
|
|
return info;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据SN条码获取已下线成品信息
|
|
/// </summary>
|
|
/// <param name="snCode"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Gets/{snCode}")]
|
|
public IEnumerable<ProductOffline> GetProdInfoBySnCode(string snCode)
|
|
{
|
|
_service.GetProductInfosBySnCode(snCode,out var info);
|
|
return new ProductOffline[] { info };
|
|
}
|
|
} |