快乐的昕的电脑
9 天以前 4a7b0fda2e0659982239020c005615758a3acbee
MES.Service/service/BasicData/SysDepartmentManager.cs
@@ -4,7 +4,9 @@
using SqlSugar;
namespace MES.Service.service.BasicData;
/// <summary>
/// 部门信息
/// </summary>
public class SysDepartmentManager : Repository<SysDepartment>
{
    // 当前类已经继承了 Repository 增、删、查、改的方法
@@ -144,8 +146,8 @@
            Depextr3 = department.FWIPStockID,
            Depextr4 = department.FForbidStatus,
            FParentID = department.FParentID,
            FSubsidiary = department.FUseOrgId,
            Fumbrella = department.FCreateOrgId,
            //FSubsidiary = department.FUseOrgId,
            //Fumbrella = department.FCreateOrgId,
            // 如果存在,使用现有的CreateDate,后续将删除后重新插入
            // 如果不存在,设为当前时间
            CreateDate = existingCustomer?.CreateDate ?? DateTime.Now,
@@ -171,6 +173,9 @@
    ? existingCustomer?.Factory
    : department.Factory,
            FSubsidiary = string.IsNullOrEmpty(department.FUseOrgId) ? "1" : department.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(department.FCreateOrgId) ? "1" : department.FCreateOrgId,
        };
        // ERP: 0=未禁用, 1=禁用