啊鑫
8 天以前 0aa54059b26e6641196e9953490dd18616e916e3
service/Warehouse/MesDepotSectionsManager.cs
@@ -9,16 +9,15 @@
{
    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,
                DepotName = b.DepotName,  // 显式指定字段别名
                DepotCode = b.DepotCode
                b.DepotName, // 显式指定字段别名
                b.DepotCode
            }).Single();
        if (sectionName == null)
@@ -33,10 +32,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
            {
@@ -57,10 +56,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)