啊鑫
2 天以前 00a72fff219241eb5b0405a066cc859d07cf7735
service/Warehouse/MesDepotSectionsManager.cs
@@ -9,15 +9,16 @@
{
    public dynamic GetSectionName(WarehouseQuery query)
    {
        var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) =>
                new JoinQueryInfos(JoinType.Inner,
                    a.DepotGuid == b.Guid)) // 确保Guid类型正确比较
        var sectionName = Db.Queryable<MesDepotSections, MesDepots>(
                (a, b) =>
                    new JoinQueryInfos(JoinType.Inner,
                        a.DepotGuid == b.Guid))  // 确保Guid类型正确比较
            .Where((a, b) => a.DepotSectionCode == query.sectionCode)
            .Select((a, b) => new // 改用匿名类型替代dynamic
            .Select((a, b) => new  // 改用匿名类型替代dynamic
            {
                a.DepotSectionName,
                b.DepotName, // 显式指定字段别名
                b.DepotCode
                DepotName = b.DepotName,  // 显式指定字段别名
                DepotCode = b.DepotCode
            }).Single();
        if (sectionName == null)
@@ -32,10 +33,10 @@
        if (string.IsNullOrEmpty(query.sectionCode))
            throw new Exception("请扫库位条码!");
        var mesDepotSections = Db
            .Queryable<MesDepotSections, MesDepots>((a, b) =>
                new JoinQueryInfos(JoinType.Inner,
                    a.DepotGuid == b.Guid))
        var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>(
                (a, b) =>
                    new JoinQueryInfos(JoinType.Inner,
                        a.DepotGuid == b.Guid))
            .Where((a, b) => a.DepotSectionCode == query.sectionCode)
            .Select((a, b) => new MesDepotSections
            {
@@ -56,10 +57,10 @@
        if (string.IsNullOrEmpty(entity.sectionCode))
            throw new Exception("请扫库位条码!");
        var mesDepotSections = Db
            .Queryable<MesDepotSections, MesDepots>((a, b) =>
                new JoinQueryInfos(JoinType.Inner,
                    a.Zuid.ToString() == b.Zuid))
        var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>(
                (a, b) =>
                    new JoinQueryInfos(JoinType.Inner,
                        a.Zuid.ToString() == b.Zuid))
            .Where((a, b) => a.DepotSectionCode == entity.sectionCode)
            .First();
        if (mesDepotSections == null)