diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/CheckMoldInput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/CheckMoldInput.cs new file mode 100644 index 00000000..eac56daa --- /dev/null +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/CheckMoldInput.cs @@ -0,0 +1,9 @@ +namespace Tnb.ProductionMgr.Entities.Entity +{ + public class CheckMoldInput + { + public string mo_task_id { get; set; } + + public string mold_qrcode { get; set; } + } +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 86b5f0a3..1ee4f9d0 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Aspose.Cells.Drawing; -using JNPF.Common.Extension; +using JNPF.Common.Extension; using JNPF.Common.Filter; using JNPF.Common.Security; using JNPF.DependencyInjection; @@ -14,15 +8,14 @@ using JNPF.Systems.Entitys.System; using JNPF.Systems.Interfaces.System; using Mapster; using Microsoft.AspNetCore.Mvc; -using Microsoft.CodeAnalysis.Operations; -using NPOI.POIFS.Properties; -using Spire.Pdf.Widget; using SqlSugar; using Tnb.BasicData; using Tnb.BasicData.Entities; using Tnb.ProductionMgr.Entities; using Tnb.ProductionMgr.Entities.Dto.PrdManage; using Tnb.ProductionMgr.Interfaces; +using Tnb.ProductionMgr.Entities.Entity; + namespace Tnb.ProductionMgr { @@ -340,5 +333,22 @@ namespace Tnb.ProductionMgr return PageResult.SqlSugarPageResult(result); } + + /// + /// pda端根据工位获取组装包装列表 + /// + /// + [HttpPost] + public async Task CheckMold(CheckMoldInput input) + { + PrdMoTask prdMoTask = 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(); + if (prdMoTask != null && basQrcode!=null) + { + return prdMoTask.mold_id == basQrcode.source_id; + } + + return false; + } } }