啊鑫
3 天以前 ab01d75a3fbc8467d81a895cba5d6dde76fbe053
MES.Service/service/BasicData/MesDepotsManager.cs
@@ -1,4 +1,5 @@
using MES.Service.DB;
using Masuit.Tools;
using MES.Service.DB;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using SqlSugar;
@@ -128,21 +129,36 @@
            IsFkc = depots.FAllowMinusQty,
            CreateBy = depots.FPrincipal,
            Depottype = depots.FStockProperty,
            IsNg = depots.FForbidStatus,
            Zuid = depots.FGroup,
            DocumentStatus = depots.FDocumentStatus,
            
            FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
                ? "1"
                :  depots.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
                ? "1"
                : depots.FCreateOrgId,
            IsNg = "A",
            FSubsidiary = "1",
            Fumbrella = "1",
            // IsNg = depots.FForbidStatus,
            // FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
            //     ? "1"
            //     :  depots.FUseOrgId,
            // Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
            //     ? "1"
            //     : depots.FCreateOrgId,
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000"
        };
        //IsNg = depots.FForbidStatus,
        if (depots.FForbidStatus.IsNullOrEmpty())
        {
            entity.IsNg = "A";
        }
        else
        {
            //我期望的值是A=否,B=是
            //实际给我的值是0或1,我希望为我转换从A和B的方式
            entity.IsNg = depots.FForbidStatus == "1" ? "B" : "A";
        }
        // 查找是否已存在相同仓库编码的记录
        var existingDepot = Db.Queryable<MesDepots>()