111
啊鑫
4 天以前 971e03ccbe5124d4761f56e71025453d1d4742bc
service/base/WmsBaseMangeer.cs
@@ -31,6 +31,20 @@
            string barcode, string sectionCode, string stockId, string stockOrgId,
            string billNo, string transactionNo)
        {
            // 参数验证
            if (string.IsNullOrEmpty(edtUserNo))
                throw new ArgumentException("操作人工号不能为空", nameof(edtUserNo));
            if (string.IsNullOrEmpty(barcode))
                throw new ArgumentException("物料条码不能为空", nameof(barcode));
            if (string.IsNullOrEmpty(sectionCode))
                throw new ArgumentException("库位编码不能为空", nameof(sectionCode));
            if (string.IsNullOrEmpty(stockId))
                throw new ArgumentException("仓库ID不能为空", nameof(stockId));
            if (string.IsNullOrEmpty(stockOrgId))
                throw new ArgumentException("库存组织ID不能为空", nameof(stockOrgId));
            if (string.IsNullOrEmpty(transactionNo))
                throw new ArgumentException("事务类型不能为空", nameof(transactionNo));
            var outputMsg = "";
            var outputStatus = -1;
@@ -46,7 +60,7 @@
                    new("@pi_sectionCode", SqlDbType.NVarChar, 100) { Value = sectionCode },
                    new("@pi_stockId", SqlDbType.NVarChar, 100) { Value = stockId },
                    new("@pi_stockOrgId", SqlDbType.NVarChar, 100) { Value = stockOrgId },
                    new("@pi_billno", SqlDbType.NVarChar, 100) { Value = billNo },
                    new("@pi_billno", SqlDbType.NVarChar, 100) { Value = string.IsNullOrEmpty(billNo) ? DBNull.Value : billNo },
                    new("@pi_transaction_no", SqlDbType.NVarChar, 10) { Value = transactionNo },
                    new("@pi_val1", SqlDbType.NVarChar, 100) { Value = DBNull.Value }, // 预留扩展字段
                    new("@pi_val2", SqlDbType.NVarChar, 100) { Value = DBNull.Value }, // 预留扩展字段
@@ -122,8 +136,9 @@
        /// <returns>货主类型(BD_OwnerOrg/BD_Customer/BD_Supplier)</returns>
        public string GetOwnerType(string ownerId)
        {
            // 如果 ownerId 为空,返回默认的货主类型
            if (string.IsNullOrEmpty(ownerId))
                throw new ArgumentNullException(nameof(ownerId));
                return "BD_OwnerOrg"; // 默认为组织类型
            if (Db.Queryable<SysOrganization>().Any(x => x.Fid == ownerId))
            {