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 { /// /// 料仓原料条码服务 /// [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> _dicWorkLine = new(); public PrdRawMaterialBarcodeService(ISqlSugarRepository repository, IUserManager userManager, IDictionaryDataService dictionaryDataService) { _db = repository.AsSugarClient(); _userManager = userManager; _dictionaryDataService = dictionaryDataService; } // /// // /// 上模校验 // /// // /// // [HttpPost] // public async Task CheckMold(string id) // { // // PrdRawMaterialBarcode prdRawMaterialBarcode = await _db.Queryable().SingleAsync(x => x.id == input.mo_task_id); // // BasQrcode basQrcode = await _db.Queryable().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; // } } }