啊鑫
3 天以前 ab01d75a3fbc8467d81a895cba5d6dde76fbe053
1111
已修改7个文件
177 ■■■■■ 文件已修改
MES.Service/service/BasicData/MesCustomerManager.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesDepotsManager.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesItemsManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesPositionManager.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesStaffManager.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesUnitManager.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/SysDepartmentManager.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesCustomerManager.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;
@@ -89,16 +90,6 @@
    private MesCustomer GetSysDepartment(ErpCustomer customer)
    {
        //ERP傳輸的接口數據轉換為MES數據庫字段
        var fForbidStatus = customer.FForbidStatus;
        if (customer.FForbidStatus == "0")
        {
            fForbidStatus = "A";
        }
        else if (customer.FForbidStatus == "1")
        {
            fForbidStatus = "B";
        }
        var entity = new MesCustomer
        {
            CustNo = customer.FNumber,
@@ -107,13 +98,14 @@
            Anred = customer.FTContact,
            Telf1 = customer.Fmobilephone,
            Fseller = customer.Fseller,
            Fforbidstatus = fForbidStatus,
            FSubsidiary = string.IsNullOrEmpty(customer.FUseOrgId)
                ? "1"
                : customer.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(customer.FCreateOrgId)
                ? "1"
                : customer.FCreateOrgId,
            // FSubsidiary = string.IsNullOrEmpty(customer.FUseOrgId)
            //     ? "1"
            //     : customer.FUseOrgId,
            // Fumbrella = string.IsNullOrEmpty(customer.FCreateOrgId)
            //     ? "1"
            //     : customer.FCreateOrgId,
            FSubsidiary = "1",
            Fumbrella = "1",
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
@@ -122,6 +114,17 @@
            Type = customer.Type,
        };
        if (customer.FForbidStatus.IsNullOrEmpty())
        {
            entity.Fforbidstatus = "A";
        }
        else
        {
            //我期望的值是A=否,B=是
            //实际给我的值是0或1,我希望为我转换从A和B的方式
            entity.Fforbidstatus = customer.FForbidStatus == "1" ? "B" : "A";
        }
        // 查找是否已存在相同客户编码的记录
        var existingCustomer = Db.Queryable<MesCustomer>()
            .Where(s => s.CustNo == entity.CustNo)
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>()
MES.Service/service/BasicData/MesItemsManager.cs
@@ -111,8 +111,8 @@
            ProductionWorkshop = item.FWorkShopId,
            ProduceUnit = item.FPRODUCEUNITID,
            SubconUnit = item.FSUBCONUNITID,
            FSubsidiary = string.IsNullOrEmpty(item.FUseOrgId) ? "1" : item.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(item.FCreateOrgId) ? "1" : item.FCreateOrgId,
            FSubsidiary = "1",
            Fumbrella = "1",
            LossPercent = item.FLOSSPERCENT,
            MnemonicCode = item.FMnemonicCode,
            ExpPeriod = item.FExpPeriod,
MES.Service/service/BasicData/MesPositionManager.cs
@@ -90,13 +90,8 @@
            PositionName = position.FName,
            PositionDescription = position.FDESCRIPTIONS,
            Department = position.FDept,
            Fforbidstatus = position.FForbidStatus,
            FSubsidiary = string.IsNullOrEmpty(position.FUseOrgId)
                ? "1"
                : position.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(position.FCreateOrgId)
                ? "1"
                : position.FCreateOrgId,
            FSubsidiary = "1",
            Fumbrella = "1",
            CreationDate = position.FCreateDate != null
                ? DateTime.ParseExact(position.FCreateDate,
                    "yyyy-MM-dd HH:mm:ss", null)
@@ -108,6 +103,17 @@
                : null,
        };
        if (position.FForbidStatus.IsNullOrEmpty())
        {
            entity.Fforbidstatus = "A";
        }
        else
        {
            //我期望的值是A=否,B=是
            //实际给我的值是0或1,我希望为我转换从A和B的方式
            entity.Fforbidstatus = position.FForbidStatus == "1" ? "B" : "A";
        }
        var mesPosition = Db.Queryable<MesPosition>()
            .Where(s => s.PositionId == entity.PositionId)
            .First();
MES.Service/service/BasicData/MesStaffManager.cs
@@ -1,4 +1,6 @@
namespace MES.Service.service.BasicData;
using Masuit.Tools;
namespace MES.Service.service.BasicData;
using MES.Service.DB;
using MES.Service.Dto.webApi;
@@ -326,18 +328,24 @@
                PositionCode = staff.FPostId,
                PhoneNumber = staff.FMobile,
                Remark = staff.FDescription,
                FforbidStatus = staff.FForbidStatus,
                FSubsidiary = string.IsNullOrEmpty(staff.FUseOrgId)
                    ? "1"
                    : staff.FUseOrgId,
                Fumbrella = string.IsNullOrEmpty(staff.FCreateOrgId)
                    ? "1"
                    : staff.FCreateOrgId,
                FSubsidiary = "1",
                Fumbrella = "1",
                CreateDate = DateTime.Now,
                LastupdateDate = DateTime.Now,
                Type = staff.Type
            };
            if (staff.FForbidStatus.IsNullOrEmpty())
            {
                entity.FforbidStatus = "A";
            }
            else
            {
                //我期望的值是A=否,B=是
                //实际给我的值是0或1,我希望为我转换从A和B的方式
                entity.FforbidStatus = staff.FForbidStatus == "1" ? "B" : "A";
            }
            if (!string.IsNullOrEmpty(staff.FStaffStartDate))
            {
                entity.StartDate = DateTime.ParseExact(staff.FStaffStartDate,
MES.Service/service/BasicData/MesUnitManager.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;
@@ -88,16 +89,6 @@
    private MesUnit GetMesUnit(ErpUnit unit)
    {
        var fForbidStatus = unit.FForbidStatus;
        if (unit.FForbidStatus == "0")
        {
            fForbidStatus = "A";
        }
        else if (unit.FForbidStatus == "1")
        {
            fForbidStatus = "B";
        }
        var entity = new MesUnit
        {
            Fnumber = unit.FNumber,
@@ -110,7 +101,6 @@
            Froundtype = unit.FRoundType,
            Fprecision = unit.FPrecision,
            Fdescription = unit.FDescription,
            Fforbidstatus = fForbidStatus,
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
@@ -118,6 +108,17 @@
            Type = unit.Type
        };
        if (unit.FForbidStatus.IsNullOrEmpty())
        {
            entity.Fforbidstatus = "A";
        }
        else
        {
            //我期望的值是A=否,B=是
            //实际给我的值是0或1,我希望为我转换从A和B的方式
            entity.Fforbidstatus = unit.FForbidStatus == "1" ? "B" : "A";
        }
        // 查找是否已存在相同单位编码的记录
        var existingUnit = Db.Queryable<MesUnit>()
            .Where(s => s.Fnumber == entity.Fnumber)
MES.Service/service/BasicData/SysDepartmentManager.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;
@@ -127,16 +128,6 @@
    // 将 ErpDepartment 对象转换为 SysDepartment 对象的方法
    private SysDepartment GetSysDepartment(ErpDepartment department)
    {
        var fForbidStatus = department.FForbidStatus;
        if (department.FForbidStatus == "0")
        {
            fForbidStatus = "A";
        }
        else if (department.FForbidStatus == "1")
        {
            fForbidStatus = "B";
        }
        var entity = new SysDepartment
        {
            Departmentcode = department.FNumber,
@@ -144,20 +135,26 @@
            Depextr1 = department.FDeptProperty,
            Depextr2 = department.FGroup,
            Depextr3 = department.FWIPStockID,
            Depextr4 = fForbidStatus,
            FParentID = department.FParentID,
            FSubsidiary = string.IsNullOrEmpty(department.FUseOrgId)
                ? "1"
                : department.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(department.FCreateOrgId)
                ? "1"
                : department.FCreateOrgId,
            FSubsidiary = "1",
            Fumbrella = "1",
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000"
        };
        if (department.FForbidStatus.IsNullOrEmpty())
        {
            entity.Depextr4 = "A";
        }
        else
        {
            //我期望的值是A=否,B=是
            //实际给我的值是0或1,我希望为我转换从A和B的方式
            entity.Depextr4 = department.FForbidStatus == "1" ? "B" : "A";
        }
        // 查找是否已存在相同部门编码的记录
        var existingDepartment = Db.Queryable<SysDepartment>()
            .Where(s => s.Departmentcode == entity.Departmentcode)