南骏 池
2025-03-29 99b5d3d7c950a8332f81d3ca07be9f2d5957f58c
service/base/WmsBaseMangeer.cs
ÎļþÃû´Ó service/base/PdaJyMangeer.cs ÐÞ¸Ä
@@ -1,4 +1,4 @@
namespace NewPdaSqlServer.util
namespace NewPdaSqlServer.service.@base
{
    using NewPdaSqlServer.Dto.service;
    using NewPdaSqlServer.entity;
@@ -9,9 +9,10 @@
    using NewPdaSqlServer.DB;
    using System.Data;
    using System.Data.SqlClient;
    using Microsoft.EntityFrameworkCore.Metadata.Internal;
    public class PdaJyMangeer
    public class WmsBaseMangeer : Repository<dynamic>
    {
        /// <summary>
@@ -26,7 +27,7 @@
        /// <param name="billNo">申请单号</param>
        /// <param name="transactionNo">事务类型</param>
        /// <returns>包含校验结果的数据传输对象</returns>
        public ProductionPickDto SalesReturnCheck(SqlSugarScope db, string edtUserNo,
        public dynamic pdaInvJY(SqlSugarScope db, string edtUserNo,
            string barcode, string sectionCode, string stockId, string stockOrgId,
            string billNo, string transactionNo)
        {
@@ -80,5 +81,37 @@
                }
            }
        }
        /// <summary>
        /// èŽ·å–æ¡ç ä¿¡æ¯
        /// </summary>
        /// <param name="unity"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public MesInvItemBarcodes GetBarInfo(WarehouseQuery unity)
        {
            var barInfo = Db.Queryable<MesInvItemBarcodes>()
                .Where(s => s.ItemBarcode == unity.barcode)
                .First();
            if (barInfo is null) throw new Exception("该条码库存不存在!");
            return barInfo; // è¿”回第一行数据,如果没有则返回 null
        }
        /// <summary>
        /// èŽ·å–ç‰©æ–™ä¿¡æ¯
        /// </summary>
        /// <param name="strItemId"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public MesItems GetItemNo(decimal strItemId)
        {
            var itemInfo = Db.Queryable<MesItems>()
                .Where(s => s.Id == strItemId && s.Fforbidstatus == "A")
                .First();
            if (itemInfo is null) throw new Exception("该条码对应物料信息不存在或已禁用!");
            return itemInfo;
        }
    }
}