快乐的昕的电脑
5 小时以前 5a0a406dd7d49e175a71eda9d6488badfa97375a
客户信息:销售员编码转ID、物料信息:转编码逻辑修正
已修改2个文件
50 ■■■■ 文件已修改
MES.Service/service/BasicData/MesCustomerManager.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesItemsManager.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesCustomerManager.cs
@@ -173,6 +173,20 @@
            Fumbrella = string.IsNullOrEmpty(customer.FCreateOrgId) ? "1" : customer.FCreateOrgId,
        };
        //销售员编码转ID,Fseller = customer.Fseller,
        var entityFseller = Db.Queryable<MesStaff>()
        .Where(x => x.StaffNo == customer.Fseller)
        .Select(x => x.Id.ToString())
        .First();
        if (!string.IsNullOrWhiteSpace(entityFseller))
        {
            entity.Fseller = entityFseller;
        }
        else
        {
            entity.Fseller = "0";
        }
        // ERP: 0=未禁用, 1=禁用
        // MES: A=未禁用, B=禁用
        if (customer.FForbidStatus.IsNullOrEmpty())
MES.Service/service/BasicData/MesItemsManager.cs
@@ -197,10 +197,6 @@
        {
            entity.ItemUnit = entityItemUnit;
        }
        else if (!string.IsNullOrWhiteSpace(item.FBaseUnitId))
        {
            entity.ItemUnit = item.FBaseUnitId;
        }
        else
        {
            entity.ItemUnit = "0";
@@ -214,10 +210,6 @@
        if (!string.IsNullOrWhiteSpace(entitySaleunit))
        {
            entity.Saleunit = entitySaleunit;
        }
        else if (!string.IsNullOrWhiteSpace(item.FSaleUnitId))
        {
            entity.Saleunit = item.FSaleUnitId;
        }
        else
        {
@@ -233,10 +225,6 @@
        {
            entity.Storeunit = entityStoreunit;
        }
        else if (!string.IsNullOrWhiteSpace(item.FStoreUnitID))
        {
            entity.Storeunit = item.FStoreUnitID;
        }
        else
        {
            entity.Storeunit = "0";
@@ -250,10 +238,6 @@
        if (!string.IsNullOrWhiteSpace(entityFpurchaseunitid))
        {
            entity.Fpurchaseunitid = entityFpurchaseunitid;
        }
        else if (!string.IsNullOrWhiteSpace(item.FPurchaseUnitId))
        {
            entity.Fpurchaseunitid = item.FPurchaseUnitId;
        }
        else
        {
@@ -269,10 +253,6 @@
        {
            entity.ProduceUnit = entityProduceUnit;
        }
        else if (!string.IsNullOrWhiteSpace(item.FPRODUCEUNITID))
        {
            entity.ProduceUnit = item.FPRODUCEUNITID;
        }
        else
        {
            entity.ProduceUnit = "0";
@@ -286,10 +266,6 @@
        if (!string.IsNullOrWhiteSpace(entitySubconUnit))
        {
            entity.SubconUnit = entitySubconUnit;
        }
        else if (!string.IsNullOrWhiteSpace(item.FSUBCONUNITID))
        {
            entity.SubconUnit = item.FSUBCONUNITID;
        }
        else
        {
@@ -305,10 +281,6 @@
        {
            entity.DepotCode = entityDepotCode;
        }
        else if (!string.IsNullOrWhiteSpace(item.FStockId))
        {
            entity.DepotCode = item.FStockId;
        }
        else
        {
            entity.DepotCode = "0";
@@ -323,10 +295,6 @@
        {
            entity.Fpurchaserid = entityFpurchaserid;
        }
        else if (!string.IsNullOrWhiteSpace(item.FPurchaserId))
        {
            entity.Fpurchaserid = item.FPurchaserId;
        }
        else
        {
            entity.Fpurchaserid = "0";
@@ -340,10 +308,6 @@
        if (!string.IsNullOrWhiteSpace(entityProductionWorkshop))
        {
            entity.ProductionWorkshop = entityProductionWorkshop;
        }
        else if (!string.IsNullOrWhiteSpace(item.FWorkShopId))
        {
            entity.ProductionWorkshop = item.FWorkShopId;
        }
        else
        {