feat 手动上传,手动设置时间范围
This commit is contained in:
@@ -108,7 +108,6 @@ public class AppointmentAreaService : IAppointmentAreaService
|
||||
DeviceUniqueNo = devices.First(item => item.Code == x).UniqueNo,
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
CancellationId = 0,
|
||||
Source = "预约区域和设备组关系变更生成",
|
||||
Priority = 99
|
||||
}));
|
||||
@@ -121,7 +120,6 @@ public class AppointmentAreaService : IAppointmentAreaService
|
||||
DeviceUniqueNo = devices.First(item => item.Code == x).UniqueNo,
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
CancellationId = 0,
|
||||
Source = "预约区域和设备组关系变更生成",
|
||||
Priority = 99
|
||||
}));
|
||||
|
||||
@@ -83,7 +83,6 @@ public abstract class BasePermissionAnalyzeService : IPermissionAnalyzeService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = source,
|
||||
Priority = 0,
|
||||
TenantId = x.TenantId,
|
||||
@@ -99,7 +98,6 @@ public abstract class BasePermissionAnalyzeService : IPermissionAnalyzeService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = source,
|
||||
Priority = 0,
|
||||
TenantId = x.TenantId,
|
||||
|
||||
@@ -225,7 +225,6 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "人员分组分配",
|
||||
Priority = 0,
|
||||
TenantId = x.TenantId
|
||||
@@ -259,7 +258,6 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "人员分组分配",
|
||||
Priority = 0,
|
||||
TenantId = x.TenantId,
|
||||
|
||||
@@ -125,7 +125,6 @@ public class DevicePermissionAnalyzeService : IDevicePermissionAnalyzeService
|
||||
DeviceUniqueNo = devices.First(item => item.Code == x).UniqueNo,
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Type = DeviceTaskEnumType.Delete,
|
||||
CancellationId = 0,
|
||||
DeviceType = devices.First(item => item.Code == x).Type,
|
||||
UserNo = userNo,
|
||||
Version = 0,
|
||||
|
||||
@@ -101,7 +101,6 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "人员分配到设备unique",
|
||||
Priority = 0,
|
||||
TenantId = currentTenantId,
|
||||
@@ -129,7 +128,6 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 20,
|
||||
Source = "人员分配到设备unique",
|
||||
Priority = 0,
|
||||
TenantId = currentTenantId
|
||||
@@ -207,7 +205,6 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "人员分配到设备import",
|
||||
Priority = 0,
|
||||
TenantId = device.TenantId,
|
||||
@@ -423,7 +420,6 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
Type = taskType,
|
||||
DeviceType = x.Type,
|
||||
UserNo = userNo,
|
||||
CancellationId = 0,
|
||||
Priority = 0,
|
||||
Version = 0,
|
||||
TenantId = x.TenantId,
|
||||
|
||||
@@ -158,7 +158,6 @@ public class DeviceTimePeriodService : IDeviceTimePeriodService
|
||||
DeviceUniqueNo = deviceUniqueNo,
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
CancellationId = 0,
|
||||
Source = source,
|
||||
Priority = 90,
|
||||
TenantId = device.TenantId
|
||||
@@ -191,7 +190,6 @@ public class DeviceTimePeriodService : IDeviceTimePeriodService
|
||||
DeviceUniqueNo = deviceUniqueNo,
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
CancellationId = 0,
|
||||
Source = source,
|
||||
Priority = 90,
|
||||
TenantId = device.TenantId
|
||||
@@ -213,7 +211,7 @@ public class DeviceTimePeriodService : IDeviceTimePeriodService
|
||||
|
||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => !SqlFunc.IsNullOrEmpty(x.TemplateCode))
|
||||
.Where(x => templateCodes.Contains(x.TemplateCode.Value) || deviceCodes.Contains(x.Code))
|
||||
.Where(x => templateCodes.Contains(x.TemplateCode) || deviceCodes.Contains(x.Code))
|
||||
.Where(x => x.Enable && x.EnableTimePeriod)
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ public class GainfoGroupService : IGainfoGroupService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "手动操作人员分组关系",
|
||||
Priority = 0,
|
||||
TenantId = device.TenantId
|
||||
@@ -209,7 +208,6 @@ public class GainfoGroupService : IGainfoGroupService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "手动操作人员分组关系",
|
||||
Priority = 0,
|
||||
TenantId = device.TenantId
|
||||
|
||||
@@ -305,7 +305,6 @@ public class GainfoService : IGainfoService
|
||||
Status = DeviceTaskStatusEnumType.Wait,
|
||||
Version = 0,
|
||||
ResultMessage = null,
|
||||
CancellationId = 0,
|
||||
Source = "安全级别提高",
|
||||
Priority = 60,
|
||||
TenantId = x.TenantId
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true,
|
||||
"Generate": false
|
||||
"Generate": true
|
||||
},
|
||||
"SwaggerOptions": {
|
||||
"Enable": true,
|
||||
|
||||
@@ -15,16 +15,15 @@ public class BusinessPlaceManagerRelationshipEntity : SugarBaseEntity , ITenantI
|
||||
/// 管理人员
|
||||
/// </summary>
|
||||
[AdaptIgnore(MemberSide.Destination)]
|
||||
[SugarColumn(ColumnDescription = "管理人员", IsNullable = false)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "管理人员")]
|
||||
public int ManagerUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "营业点", IsNullable = false)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "营业点")]
|
||||
public Guid BusinessPlaceCode { get; set; }
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
@@ -12,19 +12,19 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
/// <summary>
|
||||
/// 部门号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门号", IsNullable = false, UniqueGroupNameList = new[] { "idx_Department_No" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "部门号", UniqueGroupNameList = new[] { "idx_Department_No" })]
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上级部门号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "上级部门号")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "上级部门号")]
|
||||
public string PNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门名称", IsNullable = false)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "部门名称")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ using Mapster;
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity
|
||||
{
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 设备
|
||||
/// </summary>
|
||||
@@ -18,90 +18,89 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
/// 设备code
|
||||
/// </summary>
|
||||
[DeviceCode]
|
||||
[SugarColumn(ColumnDescription = "设备code")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "设备code")]
|
||||
public Guid Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备唯一码,IP/MAC/SNO
|
||||
/// </summary>
|
||||
[AdaptIgnore(MemberSide.Destination)]
|
||||
[SugarColumn(ColumnDescription = "设备唯一码", IsNullable = false, UniqueGroupNameList = new[] { "Idx_Device_UniqueNo" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "设备唯一码", UniqueGroupNameList = new[] { "Idx_Device_UniqueNo" })]
|
||||
public string UniqueNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 心跳间隔
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "心跳检查间隔")]
|
||||
public int HeartbeatInterval { get; set; }
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "心跳检查间隔")]
|
||||
public int HeartbeatInterval { get; set; } = 30;
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "供应商")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "供应商")]
|
||||
public string Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备功能
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", IsJson = true, ColumnDescription = "设备功能", DefaultValue = "[]")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(150)", IsJson = true, ColumnDescription = "设备功能", DefaultValue = "[]")]
|
||||
public List<DeviceFuncEnumType> Funcs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "设备类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "设备类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public DeviceTypeEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部署点
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部署点")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "部署点")]
|
||||
public string DeployPlace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部署坐标
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部署坐标")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "部署坐标")]
|
||||
public string DeployPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部署方向
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public DeviceDeployDirectionEnumType? DeployDirection { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板code")]
|
||||
public Guid? TemplateCode { get; set; }
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "模板code")]
|
||||
public Guid TemplateCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 连接信息
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "连接信息")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "连接信息")]
|
||||
public string ConnectionInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否启用")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", ColumnDescription = "是否启用")]
|
||||
public bool Enable { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否作为考勤设备
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否作为考勤设备")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", ColumnDescription = "是否作为考勤设备")]
|
||||
public bool AsAttendance { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用时段码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否启用时段码", DefaultValue = "0")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", ColumnDescription = "是否启用时段码", DefaultValue = "0")]
|
||||
public bool EnableTimePeriod { get; set; } = false;
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -29,146 +29,146 @@ public class GainfoEntity : SugarBaseEntity
|
||||
/// 人员类型
|
||||
/// </summary>
|
||||
[AdaptIgnore(MemberSide.Destination)]
|
||||
[SugarColumn(ColumnDescription = "人员类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "人员类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public GainfoUserTypeEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人员来源
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "人员来源", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "人员来源")]
|
||||
public string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "姓名")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "姓名")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学工号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "学工号", UniqueGroupNameList = new[] { "idx_Gainfo_Code" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "学工号", UniqueGroupNameList = new[] { "idx_Gainfo_Code" })]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 国家代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "国家代码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "国家代码")]
|
||||
public string CountryNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证件类型代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "证件类型代码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "证件类型代码")]
|
||||
public string IdClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 身份证号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "身份证号", UniqueGroupNameList = new[] { "idx_Gainfo_IdNo" })]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "身份证号", UniqueGroupNameList = new[] { "idx_Gainfo_IdNo" })]
|
||||
public string IdNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 身份证籍贯区域代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "身份证籍贯区域代码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "身份证籍贯区域代码")]
|
||||
public string Native { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "性别", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "性别", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public GenderEnumType Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生日
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "生日")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "生日")]
|
||||
public DateTime Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 身份证地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "身份证地址")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "身份证地址")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门编码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "部门编码")]
|
||||
public string DepartmentNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 民族代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "民族代码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "民族代码")]
|
||||
public string Nation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "手机号码")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "手机号码")]
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学历
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "学历")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "学历")]
|
||||
public string Degree { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 岗位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "岗位")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "岗位")]
|
||||
public string PositionNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 职等
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "职等")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "职等")]
|
||||
public string Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 职级
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "职级")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "职级")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卡号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "卡号", IndexGroupNameList = new[] { "idx_Gainfo_CardNo" })]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "卡号", IndexGroupNameList = new[] { "idx_Gainfo_CardNo" })]
|
||||
public string CardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人事范围
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "人事范围")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "人事范围")]
|
||||
public string Werks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工作地
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "工作地")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "工作地")]
|
||||
public string Workplace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 厂区
|
||||
/// </summary>
|
||||
[TenantId]
|
||||
[SugarColumn(ColumnDescription = "厂区")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "厂区")]
|
||||
public string Factory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "成本中心")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "成本中心")]
|
||||
public string CostId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -186,13 +186,13 @@ public class GainfoEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 身份认证用户Id(如果为空匹配code)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "身份认证用户Id", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "身份认证用户Id")]
|
||||
public int IdentityUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卡类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "卡类型", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "卡类型")]
|
||||
public int? CardType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity
|
||||
{
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 档案组
|
||||
/// </summary>
|
||||
@@ -13,39 +13,39 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
/// <summary>
|
||||
/// 父级Code
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public Guid? PCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "分组code")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "分组code")]
|
||||
public Guid Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "名称")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否默认分组
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否默认分组", ColumnDataType = "bit", DefaultValue = "1")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "是否默认分组", ColumnDataType = "bit", DefaultValue = "1")]
|
||||
public bool IsDefault { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否可编辑
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否可编辑", ColumnDataType = "bit", DefaultValue = "1")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "是否可编辑", ColumnDataType = "bit", DefaultValue = "1")]
|
||||
public bool Editable { get; set; } = true;
|
||||
|
||||
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using SqlSugar;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity
|
||||
{
|
||||
[SkipScan]
|
||||
[SugarTable(TableName = "GainfoSap")]
|
||||
public class GainfoSapEntity
|
||||
{
|
||||
@@ -11,6 +13,7 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
public string @class { get; set; }
|
||||
|
||||
public string passwd { get; set; }
|
||||
|
||||
public string question { get; set; }
|
||||
|
||||
public string answer { get; set; }
|
||||
@@ -25,6 +28,7 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
public string sex { get; set; }
|
||||
public DateTime birthday { get; set; }
|
||||
public string address { get; set; }
|
||||
|
||||
public string postcode { get; set; }
|
||||
public string occupation { get; set; }
|
||||
public string appellation { get; set; }
|
||||
@@ -33,16 +37,24 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
public string fax { get; set; }
|
||||
public string mobile { get; set; }
|
||||
public string email { get; set; }
|
||||
|
||||
public string web { get; set; }
|
||||
|
||||
public string vip { get; set; }
|
||||
|
||||
public string sec { get; set; }
|
||||
|
||||
public string cropsno { get; set; }
|
||||
|
||||
public string cropname { get; set; }
|
||||
|
||||
public string fancy { get; set; }
|
||||
public string remark { get; set; }
|
||||
|
||||
public int amount { get; set; }
|
||||
|
||||
public int days { get; set; }
|
||||
|
||||
public decimal consume01 { get; set; }
|
||||
|
||||
public decimal consume02 { get; set; }
|
||||
@@ -90,12 +102,17 @@ namespace Dlhis.Entity.Basic.Entity
|
||||
public string MASSN { get; set; }
|
||||
|
||||
public string MNTXT { get; set; }
|
||||
|
||||
public string MASSG { get; set; }
|
||||
|
||||
public string MGTXT { get; set; }
|
||||
public DateTime? logdate { get; set; }
|
||||
|
||||
public DateTime? updatelogdate { get; set; }
|
||||
|
||||
public string guestno { get; set; }
|
||||
public string ZZ_KLX { get; set; }
|
||||
|
||||
public DateTime? DAT01 { get; set; }
|
||||
|
||||
public string ZZ_COUNNM { get; set; }
|
||||
|
||||
@@ -17,7 +17,7 @@ public class WerkEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "名称")]
|
||||
[SugarColumn(ColumnDescription = "名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -53,12 +53,12 @@ public class WerkEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "结果")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "结果")]
|
||||
public string HandleMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", DefaultValue = "1")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1")]
|
||||
public bool Enable { get; set; }
|
||||
}
|
||||
@@ -15,138 +15,140 @@ public class BalanceRecordEntity : SugarBaseEntity, ISoftDeleted, ITenantId
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "流水号", UniqueGroupNameList = new[] { "Unique_BalanceRecord_No" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "流水号", UniqueGroupNameList = new[] { "Unique_BalanceRecord_No" })]
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 档案号/QRCode
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "档案号/QRCode")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "档案号/QRCode")]
|
||||
public string UserNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "姓名")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "姓名")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学工号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "学工号")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "学工号")]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门号")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "部门号")]
|
||||
public string DepartmentNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "来源")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "来源")]
|
||||
public BalanceRecordSourceEnumType Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收入/支出
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "收入/支出")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "收入/支出")]
|
||||
public BalanceRecordTypeEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额 + - 表示
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "金额+-表示")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "金额+-表示")]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "营业点", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "营业点")]
|
||||
public Guid? BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "餐别", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "餐别")]
|
||||
public Guid? BusinessShiftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "餐次", ColumnDataType = "varchar(50)", IsNullable = true, SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "餐次", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public ShiftEnumType? ShiftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属成本日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "date", ColumnDescription = "所属成本日期")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "date", ColumnDescription = "所属成本日期")]
|
||||
public DateTime CostDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费机器唯一信息
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "消费机器唯一信息", IsNullable = true)]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "消费机器唯一信息")]
|
||||
public string DeviceUniqueNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ip
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "IP")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "IP")]
|
||||
public string IP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "成本中心")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "成本中心")]
|
||||
public string CostId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费者所在基地
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "消费者所在基地")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "消费者所在基地")]
|
||||
public string OriginTenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本计算是否允许跨基地范围
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "成本计算是否允许跨基地范围")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", ColumnDescription = "成本计算是否允许跨基地范围")]
|
||||
public bool IsCostCrossTenant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "数据状态")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "数据状态")]
|
||||
public BalanceRecordStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消费时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "消费时间")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "消费时间")]
|
||||
public DateTime CostDateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐饮应用类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "餐饮应用类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "餐饮应用类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public CanteenApplicationTypeEnumType ApplicationType { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public string TenantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人事范围
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string Werks { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "bit")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
@@ -13,36 +13,36 @@ public class CanteenOrderEntity : BalanceRecordEntity
|
||||
/// <summary>
|
||||
/// 请求json
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "请求json",ColumnDataType = "varchar(2000)")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "请求json", ColumnDataType = "varchar(2000)")]
|
||||
public string RequestJson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第三方订单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "第三方订单号")]
|
||||
[SugarColumn(IsNullable = true,ColumnDescription = "第三方订单号")]
|
||||
public string ThirdNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "订单状态")]
|
||||
[SugarColumn(IsNullable = false,ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "订单状态")]
|
||||
public CanteenOrderStatusEnumType OrderStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否离线数据
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", ColumnDescription = "请求json")]
|
||||
[SugarColumn(IsNullable = false,ColumnDataType = "bit", ColumnDescription = "请求json")]
|
||||
public bool IsOffline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配送地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "配送地址")]
|
||||
[SugarColumn(IsNullable = true,ColumnDescription = "配送地址")]
|
||||
public string DeliveryAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "处理结果")]
|
||||
[SugarColumn(IsNullable = true,ColumnDescription = "处理结果")]
|
||||
public string Result { get; set; }
|
||||
}
|
||||
@@ -16,6 +16,7 @@ public class DishesCategoryEntity : SugarBaseEntity, ITenantId
|
||||
/// <summary>
|
||||
/// PCode
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public Guid? PCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -13,70 +13,70 @@ public class EMealVoucherDetailEntity : SugarBaseEntity, IVersion
|
||||
/// <summary>
|
||||
/// 主表id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "主表id")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "主表id")]
|
||||
public long VoucherId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "流水号", UniqueGroupNameList = new[] { "idx_EMealVoucherDetail_no_idno" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "流水号", UniqueGroupNameList = new[] { "idx_EMealVoucherDetail_no_idno" })]
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人员类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "人员类型(新员工/外来人员)")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "人员类型(新员工/外来人员)")]
|
||||
public string UserType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 身份证
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "证件号", UniqueGroupNameList = new[] { "idx_EMealVoucherDetail_no_idno" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "证件号", UniqueGroupNameList = new[] { "idx_EMealVoucherDetail_no_idno" })]
|
||||
public string IdNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用餐人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "用餐人")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "用餐人")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "手机号")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "手机号")]
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐开始
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "使用开始", ColumnDataType = "date")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "使用开始", ColumnDataType = "date")]
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐结束
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "使用结束", ColumnDataType = "date")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "使用结束", ColumnDataType = "date")]
|
||||
public DateTime End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "余额", ColumnDataType = "decimal(16,2)")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "余额", ColumnDataType = "decimal(16,2)")]
|
||||
public decimal Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "原始余额", ColumnDataType = "decimal(16,2)")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "原始余额", ColumnDataType = "decimal(16,2)")]
|
||||
public decimal OriginBalance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 版本
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "版本")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "版本")]
|
||||
public int Version { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(255)")]
|
||||
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(255)")]
|
||||
public string Signature { get; set; }
|
||||
}
|
||||
@@ -13,72 +13,72 @@ public class EMealVoucherEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// oa流程id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "oa流程id", UniqueGroupNameList = new[] { "index_EMealVoucher_No" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "oa流程id", UniqueGroupNameList = new[] { "index_EMealVoucher_No" })]
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "标题")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "标题")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请人工号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "申请人工号", IndexGroupNameList = new[] { "index_EMealVoucher_Code" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "申请人工号", IndexGroupNameList = new[] { "index_EMealVoucher_Code" })]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本中心
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "成本中心")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "成本中心")]
|
||||
public string CostId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来宾公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "来宾来源")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "来宾来源")]
|
||||
public string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "手机号")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "手机号")]
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来宾人数
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "来宾人数")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "来宾人数")]
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐事由
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "申请事由")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "申请事由")]
|
||||
public string Reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐次
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "就餐次", ColumnDataType = "varchar(500)", IsJson = true)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "就餐次", ColumnDataType = "varchar(500)", IsJson = true)]
|
||||
public List<ShiftEnumType> Shifts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 可消费厂区
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "可消费厂区", ColumnDataType = "varchar(500)", IsJson = true)]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "可消费厂区", ColumnDataType = "varchar(500)", IsJson = true)]
|
||||
public List<string> Factories { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "申请日期")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "申请日期")]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 厂区
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "厂区")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "厂区")]
|
||||
public string Factory { get; set; }
|
||||
}
|
||||
@@ -26,23 +26,22 @@ public class MealSupplementRecordEntity : MealSupplementRequestRecordEntity
|
||||
/// <summary>
|
||||
/// 餐补状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public MealSupplementStatusEnumtype Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "处理结果", ColumnDataType = "varchar(2000)")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "处理结果", ColumnDataType = "varchar(2000)")]
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态同步
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
|
||||
public bool Sync { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 餐补请求记录
|
||||
/// </summary>
|
||||
|
||||
@@ -22,6 +22,7 @@ public class UserBalanceEntity : SugarBaseEntity, IVersion
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "余额")]
|
||||
public decimal Balance { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public int Version { get; set; }
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class FileVersionEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 描述信息
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "描述信息")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "描述信息")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -39,5 +39,3 @@ public class FileVersionEntity : SugarBaseEntity
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "文件地址")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
||||
/// <summary>
|
||||
/// 上级设备组code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "上级设备组code")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "上级设备组code")]
|
||||
public Guid? PCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -37,20 +37,20 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
||||
/// <summary>
|
||||
/// 设备组名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "设备组名称")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "设备组名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否可编辑
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", DefaultValue = "1", ColumnDescription = "是否可编辑")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1", ColumnDescription = "是否可编辑")]
|
||||
public bool Editable { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 可设置下级
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", DefaultValue = "1")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1")]
|
||||
public bool AbleSetNext { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
@@ -62,16 +62,17 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
||||
/// <summary>
|
||||
/// 可作为预约分组
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
|
||||
public bool AsAppointment { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否为出差分组
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
|
||||
public bool IsBusinessTrip { get; set; } = false;
|
||||
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string TenantId { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
|
||||
public DeviceTaskEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -44,27 +44,22 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
|
||||
/// <summary>
|
||||
/// 任务下发状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
|
||||
public DeviceTaskStatusEnumType Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据版本
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public int Version { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "longtext")]
|
||||
[SugarColumn(IsNullable = true, ColumnDataType = "longtext")]
|
||||
public string ResultMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 取消id
|
||||
/// </summary>
|
||||
[SugarColumn(DefaultValue = "0")]
|
||||
public long CancellationId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 任务来源
|
||||
/// </summary>
|
||||
@@ -74,7 +69,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
|
||||
/// <summary>
|
||||
/// 优先级
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, DefaultValue = "0")]
|
||||
[SugarColumn(IsNullable = false, DefaultValue = "0")]
|
||||
public int Priority { get; set; } = 0;
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,6 @@ public class DeviceUploadLogEntity : SugarBaseEntity, ITenantId
|
||||
public bool Status { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(IndexGroupNameList = new string[] { "idx_DeviceUploadLog_TenantId" })]
|
||||
[SugarColumn(IndexGroupNameList = new[] { "idx_DeviceUploadLog_TenantId" })]
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Device.Entities;
|
||||
|
||||
[SugarTable(TableName = "DeviceUploadLogManually", TableDescription = "设备上传记录")]
|
||||
public class DeviceUploadLogManuallyEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
[SugarColumn(IsNullable = false, IndexGroupNameList = new[] { "idx_DeviceUploadLogManually_deviceNo" })]
|
||||
public string DeviceNo { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public DateTime End { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
|
||||
public bool IsFinished { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Kurisu.AspNetCore;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
|
||||
@@ -14,76 +14,76 @@ public class MenuEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "code")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上级
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "上级")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "上级")]
|
||||
public string PCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "标题")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "标题")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "名称")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "图标")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "图标")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 路由地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "路由地址")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "路由地址")]
|
||||
public string Route { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 权限标识
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "权限标识")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "权限标识")]
|
||||
public string Permission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为外链
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否为外链")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "是否为外链")]
|
||||
public bool IsLink { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "序号")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "序号")]
|
||||
public int Sequence { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否可见
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否可见")]
|
||||
[SugarColumn(IsNullable = false, ColumnDescription = "是否可见")]
|
||||
public bool Visible { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 菜单类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "菜单类型")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "菜单类型")]
|
||||
public MenuEnumType MenuType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 平台类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "平台类型")]
|
||||
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "平台类型")]
|
||||
public PlatformEnumType Platform { get; set; }
|
||||
}
|
||||
@@ -26,11 +26,13 @@ public class VisitorAppointmentDetailEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 证件类型
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public string IdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 证件号
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public string IdNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -48,17 +50,19 @@ public class VisitorAppointmentDetailEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 车牌
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "车牌")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "车牌")]
|
||||
public string LicensePlate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进入门岗
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public bool IsEnterDoorArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预约门禁区域
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string ApplyDoorArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -76,34 +80,37 @@ public class VisitorAppointmentDetailEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 是否进入车间
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = false)]
|
||||
public bool IsEnterWorkplace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请车间区域
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "车间区域", IsJson = true, DefaultValue = "[]")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "车间区域", IsJson = true, DefaultValue = "[]")]
|
||||
public List<string> ApplyWorkplaceAreas { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 车间访问开始
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime? WorkplaceStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 车间访问结束
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime? WorkplaceEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 社保照片url
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "社保照片url")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "社保照片url")]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注")]
|
||||
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -79,4 +79,24 @@ public class DeviceUploadLogsController : ControllerBase
|
||||
{
|
||||
return await _deviceUploadLogService.GetDeviceUploadRecordSettingAsync(deviceNo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动上传考勤记录
|
||||
/// </summary>
|
||||
/// <param name="logIds"></param>
|
||||
[HttpPost("manuallyUpload")]
|
||||
public async Task ManuallyUploadAsync(List<long> logIds)
|
||||
{
|
||||
await _deviceUploadLogService.ManuallyUploadAsync(logIds);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动设置上传考勤时间范围
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
[HttpPost("manuallySetTimeInfo")]
|
||||
public async Task ManuallySetTimeInfoAsync(DeviceUploadLogManuallySetTimeInfoRequest request)
|
||||
{
|
||||
await _deviceUploadLogService.ManuallySetTimeInfoAsync(request.DeviceNo, request.Start, request.End);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
|
||||
public class DeviceUploadLogManuallySetTimeInfoRequest : IValidatableObject
|
||||
{
|
||||
[Required(ErrorMessage = "设备号不能为空")]
|
||||
public string DeviceNo { get; set; }
|
||||
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
public DateTime End { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Start >= End)
|
||||
{
|
||||
yield return new ValidationResult("开始时间不可大于等于结束时间");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
|
||||
public class SetUploadLogsBeginDateTimeRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备号不能为空
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "设备号不能为空")]
|
||||
public string DeviceUniqueNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTime Begin { get; set; }
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public interface IDeviceUploadLogService : IScopeDependency
|
||||
/// <returns></returns>
|
||||
Task<List<DeviceUploadLogResponse>> GetMyRecordsAsync(DeviceUploadLogMyRecordRequest request);
|
||||
|
||||
|
||||
Task QiaoqiaoGaoshiqingAsync(DeviceUploadLogSecretAddRequest request);
|
||||
|
||||
|
||||
@@ -37,4 +38,20 @@ public interface IDeviceUploadLogService : IScopeDependency
|
||||
/// <param name="deviceNo"></param>
|
||||
/// <returns></returns>
|
||||
Task<DateTimePeriod> GetDeviceUploadRecordSettingAsync(string deviceNo);
|
||||
|
||||
/// <summary>
|
||||
/// 手动上传考勤记录
|
||||
/// </summary>
|
||||
/// <param name="requestIds"></param>
|
||||
/// <returns></returns>
|
||||
Task ManuallyUploadAsync(List<long> requestIds);
|
||||
|
||||
/// <summary>
|
||||
/// 手动设置获取记录时间范围
|
||||
/// </summary>
|
||||
/// <param name="deviceNo"></param>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <returns></returns>
|
||||
Task ManuallySetTimeInfoAsync(string deviceNo, DateTime start, DateTime end);
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Jip.Api;
|
||||
using Dlhis.Jip.Api.Requests;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Response;
|
||||
using Kurisu.AspNetCore.Authentication.Abstractions;
|
||||
@@ -16,11 +18,13 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly ICurrentUser _currentUser;
|
||||
private readonly IJinkoJipApi _jinkoJipApi;
|
||||
|
||||
public DeviceUploadLogService(IDbContext dbContext, ICurrentUser currentUser)
|
||||
public DeviceUploadLogService(IDbContext dbContext, ICurrentUser currentUser, IJinkoJipApi jinkoJipApi)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_currentUser = currentUser;
|
||||
_jinkoJipApi = jinkoJipApi;
|
||||
}
|
||||
|
||||
public async Task UploadLogsAsync(List<DeviceUploadLogUploadRequest> requests)
|
||||
@@ -103,6 +107,64 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task ManuallyUploadAsync(List<long> requestIds)
|
||||
{
|
||||
var existsOther = await _dbContext.Queryable<DeviceUploadLogEntity>()
|
||||
.Where(x => requestIds.Contains(x.Id))
|
||||
.Where(x => x.Type != DeviceUploadLogTypeEnumType.Attendance)
|
||||
.AnyAsync();
|
||||
|
||||
existsOther.ThrowIfTrue("存在非考勤通行记录,无法上传");
|
||||
|
||||
var requests = await _dbContext.Queryable<DeviceUploadLogEntity>()
|
||||
.LeftJoin<DeviceEntity>((x, device) => x.DeviceUniqueNo == device.UniqueNo)
|
||||
.Where(x => x.Sync == false)
|
||||
.Where(x => !string.IsNullOrEmpty(x.UserUniqueNo))
|
||||
.Where(x => SqlFunc.Subqueryable<OutsourceEntity>().Where(p => p.Code == x.UserUniqueNo).NotAny())
|
||||
.Where(x => requestIds.Contains(x.Id))
|
||||
.Select((x, device) => new UploadAttendanceRequestItem
|
||||
{
|
||||
Id = x.Id,
|
||||
RaiseDateTime = x.RaiseDateTime,
|
||||
ZNOTE = device.DeployPlace,
|
||||
ZWORKCODE = x.UserUniqueNo
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
if (requests.Any())
|
||||
{
|
||||
foreach (var items in requests.Chunk(500))
|
||||
{
|
||||
var ids = items.Select(x => x.Id).ToList();
|
||||
var r = await _jinkoJipApi.UploadAttendancesAsync(new UploadAttendanceRequest { Data = items.ToList() });
|
||||
if (r.OLX == "0")
|
||||
{
|
||||
await _dbContext.Updateable<DeviceUploadLogEntity>()
|
||||
.SetColumns(x => x.Sync == true)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => ids.Contains(x.Id))
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task ManuallySetTimeInfoAsync(string deviceNo, DateTime start, DateTime end)
|
||||
{
|
||||
var exists = await _dbContext.Queryable<DeviceUploadLogManuallyEntity>().Where(x => x.DeviceNo == deviceNo).Where(x => x.IsFinished == false).AnyAsync();
|
||||
exists.ThrowIfTrue("已存在时间配置尚未完成");
|
||||
|
||||
await _dbContext.InsertAsync(new DeviceUploadLogManuallyEntity
|
||||
{
|
||||
DeviceNo = deviceNo,
|
||||
Start = start,
|
||||
End = end,
|
||||
IsFinished = false
|
||||
});
|
||||
}
|
||||
|
||||
public async Task QiaoqiaoGaoshiqingAsync(DeviceUploadLogSecretAddRequest request)
|
||||
{
|
||||
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == request.DeviceUniqueNo).SingleAsync();
|
||||
@@ -122,7 +184,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
TenantId = device.TenantId,
|
||||
Status = true,
|
||||
CreatedBy = 1,
|
||||
ModifiedBy = 1,
|
||||
ModifiedBy = 1
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ public class CreateGetUploadRecordJob : BaseJob
|
||||
TenantId = x.TenantId,
|
||||
Version = 0,
|
||||
Type = DeviceTaskEnumType.UploadRecord,
|
||||
CancellationId = 0,
|
||||
Priority = 50,
|
||||
Source = "定时任务创建设备获取通行记录任务"
|
||||
}).ToList();
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
"profiles": {
|
||||
"Dlhis.ScheduledTask": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger/index.html",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://*:5010"
|
||||
"applicationUrl": "http://localhost:5010;http://*:5010;"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ using Newtonsoft.Json.Linq;
|
||||
using Kurisu.AspNetCore.Utils;
|
||||
using Dlhis.ScheduledTask.TaskAssignment.Dto;
|
||||
using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
|
||||
namespace Dlhis.ScheduledTask.TaskAssignment.Services.Implements;
|
||||
@@ -153,12 +152,13 @@ public class AssignmentService : IAssignmentService
|
||||
|
||||
case DeviceTaskEnumType.UploadRecord:
|
||||
{
|
||||
var timeInfo = deviceUploadInfos[d];
|
||||
dto.Info = new UploadRecordToDeviceResponse
|
||||
{
|
||||
DateTimePeriod = new DateTimePeriod
|
||||
{
|
||||
Start = deviceUploadInfos.TryGetValue(d, out var dt) ? (dt ?? DateTime.Now) : DateTime.Now,
|
||||
End = DateTime.Now.AddDays(1)
|
||||
Start = timeInfo.Item1,
|
||||
End = timeInfo.Item2
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -328,15 +328,21 @@ public class AssignmentService : IAssignmentService
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<Dictionary<string, DateTime?>> GetDeviceUploadRecordInfosAsync(List<TaskDto> data)
|
||||
private async Task<Dictionary<string, (DateTime, DateTime)>> GetDeviceUploadRecordInfosAsync(List<TaskDto> data)
|
||||
{
|
||||
if (data.All(x => x.Type != DeviceTaskEnumType.UploadRecord))
|
||||
{
|
||||
return new Dictionary<string, DateTime?>();
|
||||
return new Dictionary<string, (DateTime, DateTime)>();
|
||||
}
|
||||
|
||||
var deviceNos = data.Select(x => x.DeviceUniqueNo).Distinct().ToList();
|
||||
var result = new Dictionary<string, DateTime?>(deviceNos.Count);
|
||||
var result = new Dictionary<string, (DateTime, DateTime)>(deviceNos.Count);
|
||||
|
||||
var manualSettings = await _dbContext.Queryable<DeviceUploadLogManuallyEntity>().Where(x => deviceNos.Contains(x.DeviceNo))
|
||||
.Where(x => x.IsFinished == false)
|
||||
.OrderBy(x => x.CreateTime)
|
||||
.Select(x => new { x.Id, x.DeviceNo, x.Start, x.End })
|
||||
.ToListAsync();
|
||||
|
||||
var logInfos = await _dbContext.Queryable<DeviceUploadLogEntity>()
|
||||
.GroupBy(x => x.DeviceUniqueNo)
|
||||
@@ -347,11 +353,26 @@ public class AssignmentService : IAssignmentService
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var commonEnd = DateTime.Now.AddDays(1);
|
||||
foreach (var item in deviceNos)
|
||||
{
|
||||
var logInfo = logInfos.FirstOrDefault(x => x.DeviceUniqueNo == item);
|
||||
result.Add(item, logInfo?.RaiseDateTime);
|
||||
var setting = manualSettings.FirstOrDefault(x => x.DeviceNo == item);
|
||||
if (setting != null)
|
||||
{
|
||||
result.Add(item, (setting.Start, setting.End));
|
||||
}
|
||||
else
|
||||
{
|
||||
var logInfo = logInfos.FirstOrDefault(x => x.DeviceUniqueNo == item);
|
||||
result.Add(item, logInfo == null ? (DateTime.Now.AddMinutes(-10), commonEnd) : (logInfo.RaiseDateTime, commonEnd));
|
||||
}
|
||||
}
|
||||
|
||||
//更新为已处理
|
||||
await _dbContext.Updateable<DeviceUploadLogManuallyEntity>()
|
||||
.SetColumns(x => x.IsFinished == true)
|
||||
.Where(x => manualSettings.Select(p => p.Id).Contains(x.Id))
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user