Files
tnb.server/ProductionMgr/Tnb.ProductionMgr/PrdRawMaterialBarcodeService.cs
2024-08-02 11:13:05 +08:00

43 lines
1.8 KiB
C#

using JNPF.Common.Core.Manager;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Systems.Interfaces.System;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr
{
/// <summary>
/// 料仓原料条码服务
/// </summary>
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
[Route("api/[area]/[controller]/[action]")]
public class PrdRawMaterialBarcodeService: IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
private readonly IDictionaryDataService _dictionaryDataService;
private readonly IUserManager _userManager;
private static Dictionary<string, Tuple<string, string>> _dicWorkLine = new();
public PrdRawMaterialBarcodeService(ISqlSugarRepository<PrdRawMaterialBarcode> repository,
IUserManager userManager,
IDictionaryDataService dictionaryDataService)
{
_db = repository.AsSugarClient();
_userManager = userManager;
_dictionaryDataService = dictionaryDataService;
}
// /// <summary>
// /// 上模校验
// /// </summary>
// /// <returns></returns>
// [HttpPost]
// public async Task<dynamic> CheckMold(string id)
// {
// // PrdRawMaterialBarcode prdRawMaterialBarcode = await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == input.mo_task_id);
// // BasQrcode basQrcode = await _db.Queryable<BasQrcode>().Where(x => x.source_name == "TOOL_MOLDS" && x.code == input.mold_qrcode).FirstAsync();
// // return prdMoTask != null && basQrcode != null ? prdMoTask.mold_id == basQrcode.source_id : (dynamic)false;
// }
}
}