schangxiang@126.com
2024-11-28 9d5055d60bb77697d7197d19a8ecd549bff09b09
核对标签工位
已添加1个文件
已修改1个文件
62 ■■■■■ 文件已修改
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsOperationTaskService.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateLabelInput.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsOperationTaskService.cs
@@ -18,15 +18,18 @@
    private readonly SqlSugarRepository<WmsStockQuan> _wmsStockQuanRep;
    private readonly SqlSugarRepository<Mes_Package_Gather> _mesPackageGatherRep;
    private readonly SqlSugarRepository<SysConfig> _sysConfigRep;
    private readonly SqlSugarRepository<Mes_BatchOrderUPI_New> _mesBatchOrderUpiRep;
    public WmsOperationTaskService(SqlSugarRepository<WmsRbLineTask> rep, SqlSugarRepository<WmsStockQuan> wmsStockQuanRep
        , SqlSugarRepository<Mes_Package_Gather> mesPackageGatherRep
        , SqlSugarRepository<SysConfig> sysConfigRep
        , SqlSugarRepository<Mes_BatchOrderUPI_New> mesBatchOrderUpiRep
        )
    {
        _sysConfigRep = sysConfigRep;
        _mesPackageGatherRep = mesPackageGatherRep;
        _rep = rep;
        _wmsStockQuanRep = wmsStockQuanRep;
        _mesBatchOrderUpiRep = mesBatchOrderUpiRep;
    }
@@ -122,5 +125,39 @@
        output.QiTaoReuslt = _QiTaoReuslt;
        return output;
    }
    /// <summary>
    /// æ ¸å¯¹æ ‡ç­¾
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    [HttpPost]
    [ApiDescriptionSettings(Name = "ValdateLabel")]
    [Description("WmsOperationTask/ValdateLabel")]
    public async Task<Mes_Package_Gather> ValdateLabel(ValidateLabelInput input)
    {
        if (input == null || input.PackageCode == null || input.Upi == null)
        {
            throw Oops.Oh("参数不能为空");
        }
        var singleUpi = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.UPI == input.Upi).FirstAsync();
        if (singleUpi == null)
        {
            throw Oops.Oh($"没有找到部件条码{input.Upi}的数据");
        }
        if (singleUpi.PackageCode != input.PackageCode)
        {
            throw Oops.Oh($"部件条码{input.Upi}所属包是{singleUpi.PackageCode},跟扫描的包号{input.PackageCode}不符");
        }
        var singlePackage = await _mesPackageGatherRep.AsQueryable().Where(x => x.PackageCode == input.PackageCode).FirstAsync();
        if (singlePackage == null)
        {
            throw Oops.Oh($"没有找到包号{input.PackageCode}的汇总数据");
        }
        return singlePackage;
    }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateLabelInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// æ ¸å¯¹æ ‡ç­¾è¾“入参数
/// </summary>
public class ValidateLabelInput
{
    /// <summary>
    /// åŒ…装号
    /// </summary>
    public virtual string PackageCode { get; set; }
    /// <summary>
    /// éƒ¨ä»¶æ¡ç 
    /// </summary>
    public virtual string Upi { get; set; }
}