南骏 池
2025-11-14 30561a499608d9591b8caa4462709a1fbaf76447
1.期初入库优化
已修改1个文件
21 ■■■■■ 文件已修改
service/Warehouse/InventoryManager.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/Warehouse/InventoryManager.cs
@@ -31,7 +31,7 @@
                ))
            .Where((a, b) => a.DepotSectionCode == p_section_code)
            .Select((a, b) => new
                { a.DepotSectionName, b.DepotCode, b.DepotName })
            { a.DepotSectionName, b.DepotCode, b.DepotName })
            .Single();
        // 如果库位代码不存在,则返回错误信息
@@ -63,7 +63,7 @@
                ))
            .Where((a, b) => a.DepotSectionCode == p_section_code)
            .Select((a, b) => new
                { a.DepotSectionName, b.DepotCode, b.DepotName, b.DepotId,b.FSubsidiary })
            { a.DepotSectionName, b.DepotCode, b.DepotName, b.DepotId, b.FSubsidiary })
            .Single();
        // 如果库位代码不存在,则返回错误信息
@@ -110,8 +110,8 @@
            billNo: "", // 根据实际单据号传值
            transactionNo: "601" // 事务类型与存储过程匹配
        );
        if ( Convert.ToInt32(checkResult.result) < 1)
        if (Convert.ToInt32(checkResult.result) < 1)
            throw new Exception($"入库校验失败:{checkResult.strMsg}");
        UseTransaction(db =>
@@ -226,7 +226,8 @@
                WorkNo = c_mes_inv_item_barcodes.WorkNo,
                WorkLine = c_mes_inv_item_barcodes.WorkLine,
                SuppNo = c_mes_inv_item_barcodes.SuppNo,
                ItemId = c_mes_inv_item_barcodes.ItemId
                ItemId = c_mes_inv_item_barcodes.ItemId,
                Description = "期初入库"
            }).IgnoreColumns(true).ExecuteCommand();
            // 插入库存信息
@@ -255,6 +256,8 @@
                ItemId = c_mes_inv_item_barcodes.ItemId,
                IndepUserCode = c_user,
                StockOrgId = depotSection.FSubsidiary,
                OwnerId = depotSection.FSubsidiary,
                OwnerType = "BD_OwnerOrg",
                // Fsubsidiary = c_organize
            }).IgnoreColumns(true).ExecuteCommand();
@@ -366,20 +369,20 @@
                    while (reader.Read())
                    {
                        var barcode = reader.GetString(0);
                        // 构建符合方法签名的参数对象
                        var scanQuery = new WarehouseQuery
                        var scanQuery = new WarehouseQuery
                        {
                            barcode = barcode,
                            DepotCode = query.sectionCode, // 从原始query获取库位编码
                            userName = query.userName // 从原始query获取用户账号
                        };
                        try
                        {
                            // 调用正式签名方法
                            ScanBarcode(scanQuery);
                            var printData = GetPrintBar(barcode);
                            var printData = GetPrintBar(barcode);
                            resultList.Add(printData);
                        }
                        catch (Exception ex)