diff --git a/Src/Dlhis.Entity/Device/Entities/DeviceGroupEntity.cs b/Src/Dlhis.Entity/Device/Entities/DeviceGroupEntity.cs
index 1b7a35d3..4b2b916f 100644
--- a/Src/Dlhis.Entity/Device/Entities/DeviceGroupEntity.cs
+++ b/Src/Dlhis.Entity/Device/Entities/DeviceGroupEntity.cs
@@ -61,6 +61,12 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
public bool AsAppointment { get; set; } = false;
+
+ ///
+ /// 是否为出差分组
+ ///
+ [SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
+ public bool IsBusinessTrip { get; set; } = false;
public string TenantId { get; set; }
diff --git a/Src/Dlhis.ScheduledTask/Jobs/CreateDefinitelyGroupJob.cs b/Src/Dlhis.ScheduledTask/Jobs/CreateDefinitelyGroupJob.cs
index 40cc38fe..6c47d56c 100644
--- a/Src/Dlhis.ScheduledTask/Jobs/CreateDefinitelyGroupJob.cs
+++ b/Src/Dlhis.ScheduledTask/Jobs/CreateDefinitelyGroupJob.cs
@@ -117,10 +117,11 @@ public class CreateDefinitelyGroupJob : BaseJob
var factoryName = $"*{type.GetDescription()}厂区系统组({factory.Name})";
if (!await DbContext.Queryable().Where(x => x.PCode == workplaceGrp.Code).AnyAsync(x => x.Name == factoryName))
{
+ var currentCode = Guid.NewGuid();
await DbContext.InsertAsync(new DeviceGroupEntity
{
PCode = workplaceGrp.Code,
- Code = Guid.NewGuid(),
+ Code = currentCode,
Type = type,
Name = factoryName,
Editable = false,
@@ -129,6 +130,22 @@ public class CreateDefinitelyGroupJob : BaseJob
TenantId = factory.Code,
});
+
+ if (type == DeviceTypeEnumType.Door)
+ {
+ await DbContext.InsertAsync(new DeviceGroupEntity
+ {
+ PCode = currentCode,
+ Code = currentCode,
+ Type = type,
+ Name = "出差组",
+ Editable = false,
+ AbleSetNext = false,
+ Remark = _remark,
+ IsBusinessTrip = true,
+ TenantId = factory.Code
+ });
+ }
}
}
}