diff --git a/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentDetailEntity.cs b/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentDetailEntity.cs
index 9f6bca82..f45203f0 100644
--- a/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentDetailEntity.cs
+++ b/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentDetailEntity.cs
@@ -11,9 +11,6 @@ namespace Dlhis.Entity.Visitor.Entity;
[SugarTable(TableName = "VisitorAppointmentDetail", TableDescription = "访客预约")]
public class VisitorAppointmentDetailEntity : SugarBaseEntity
{
- [SugarColumn(IsNullable = false, ColumnDescription = "pid")]
- public long AppointmentId { get; set; }
-
///
/// 流水号
///
@@ -26,6 +23,16 @@ public class VisitorAppointmentDetailEntity : SugarBaseEntity
[SugarColumn(IsNullable = false, ColumnDescription = "用户No")]
public string UserNo { get; set; }
+ ///
+ /// 证件类型
+ ///
+ public string IdType { get; set; }
+
+ ///
+ /// 证件号
+ ///
+ public string IdNo { get; set; }
+
///
/// 访客名称
///
diff --git a/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentEntity.cs b/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentEntity.cs
index 5a54b39f..e2a59ff2 100644
--- a/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentEntity.cs
+++ b/Src/Dlhis.Entity/Visitor/Entity/VisitorAppointmentEntity.cs
@@ -26,20 +26,56 @@ public class VisitorAppointmentEntity : SugarBaseEntity
public string Code { get; set; }
///
- /// 来访人公司
+ /// 来访人来源/公司
///
- public string Company { get; set; }
+ public string Source { get; set; }
///
/// 申请时间
///
- public DateTime ApplyTime { get; set; }
+ public DateTime Date { get; set; }
///
- /// 预约区域
+ /// 预约门禁区域
///
- public string ApplyArea { get; set; }
+ public string ApplyDoorArea { get; set; }
+
+ ///
+ /// 访客开始
+ ///
+ public DateTime DoorStart { get; set; }
+
+ ///
+ /// 访问结束
+ ///
+ public DateTime DoorEnd { get; set; }
+
+ ///
+ /// 是否进入车间
+ ///
+ public bool IsEnterWorkplace { get; set; }
+
+ ///
+ /// 申请车间区域
+ ///
+ public string ApplyWorkplaceArea { get; set; }
+
+ ///
+ /// 车间访问开始
+ ///
+ public DateTime? WorkplaceStart { get; set; }
+
+ ///
+ /// 车间访问结束
+ ///
+ public DateTime? WorkplaceEnd { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
///
/// 预约厂区
///
@@ -49,24 +85,4 @@ public class VisitorAppointmentEntity : SugarBaseEntity
/// 申请事由
///
public string Reason { get; set; }
-
- ///
- /// 访客开始
- ///
- public DateTime Start { get; set; }
-
- ///
- /// 访问结束
- ///
- public DateTime End { get; set; }
-
- ///
- /// 备注
- ///
- public string Remark { get; set; }
-
- ///
- /// 是否进入车间
- ///
- public bool IsEnterWorkplace { get; set; }
}
\ No newline at end of file
diff --git a/Src/Dlhis.External/Appointment/Controllers/AppointmentsController.cs b/Src/Dlhis.External/Appointment/Controllers/AppointmentsController.cs
index 5f0e57ed..48b3237a 100644
--- a/Src/Dlhis.External/Appointment/Controllers/AppointmentsController.cs
+++ b/Src/Dlhis.External/Appointment/Controllers/AppointmentsController.cs
@@ -22,7 +22,7 @@ public class AppointmentsController : ControllerBase
}
///
- /// 接受预约申请
+ /// 接收预约申请
///
///
///
diff --git a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs
index f7c51b7d..538a73b4 100644
--- a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs
+++ b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs
@@ -14,9 +14,15 @@ public class AppointmentReceiveItemDto
/// 手机号
///
[StringLength(11, MinimumLength = 11)]
- [Required(ErrorMessage = "手机号必填")]
+ [Required]
public string Phone { get; set; }
+ ///
+ /// 证件类型
+ ///
+ [Required]
+ public string IdType { get; set; }
+
///
/// 证件号/工号
///
diff --git a/Src/Dlhis.External/Appointment/Request/AppointmentReceiveRequest.cs b/Src/Dlhis.External/Appointment/Request/AppointmentReceiveRequest.cs
index 758f1a9a..ad46a4c9 100644
--- a/Src/Dlhis.External/Appointment/Request/AppointmentReceiveRequest.cs
+++ b/Src/Dlhis.External/Appointment/Request/AppointmentReceiveRequest.cs
@@ -9,37 +9,73 @@ public class AppointmentReceiveRequest : IValidatableObject
///
/// 流水号
///
- [Required(ErrorMessage = "流水号必填")]
+ [Required(ErrorMessage = "流程不可为空")]
public string No { get; set; }
///
/// 标题
///
- [Required(ErrorMessage = "标题必填")]
+ [Required(ErrorMessage = "标题不可为空")]
public string Title { get; set; }
///
/// 对接人工号
///
- [Required(ErrorMessage = "对接人工号必填")]
+ [Required(ErrorMessage = "对接人工号不可为空")]
public string Code { get; set; }
///
- /// 预约区域
+ /// 预约门岗区域
///
- [Required(ErrorMessage = "申请预约区域必填")]
- public string ApplyArea { get; set; }
+ [Required(ErrorMessage = "预约门岗区域不可为空")]
+ public string ApplyDoorArea { get; set; }
///
- /// 来访人公司
+ /// 来访人来源/公司
///
- [Required(ErrorMessage = "来源公司不可为空")]
- public string Company { get; set; }
+ [Required(ErrorMessage = "来源/公司不可为空")]
+ public string Source { get; set; }
///
/// 申请时间
///
- public DateTime ApplyTime { get; set; }
+ public DateTime Date { get; set; }
+
+ ///
+ /// 访客开始
+ ///
+ public DateTime DoorStart { get; set; }
+
+ ///
+ /// 访问结束
+ ///
+ public DateTime DoorEnd { get; set; }
+
+ ///
+ /// 是否进入车间
+ ///
+ public bool IsEnterWorkplace { get; set; }
+
+ ///
+ /// 申请车间区域
+ ///
+ public string ApplyWorkplaceArea { get; set; }
+
+ ///
+ /// 车间访问开始
+ ///
+ public DateTime? WorkplaceStart { get; set; }
+
+ ///
+ /// 车间访问结束
+ ///
+ public DateTime? WorkplaceEnd { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
///
/// 预约厂区
@@ -53,31 +89,6 @@ public class AppointmentReceiveRequest : IValidatableObject
[Required(ErrorMessage = "申请事由不能为空")]
public string Reason { get; set; }
- ///
- /// 访客开始
- ///
- public DateTime Start { get; set; }
-
- ///
- /// 访问结束
- ///
- public DateTime End { get; set; }
-
- ///
- /// 备注
- ///
- public string Remark { get; set; }
-
- ///
- /// 是否进入车间
- ///
- public bool IsEnterWorkplace { get; set; }
-
- ///
- /// 车间区域
- ///
- public string WorkplaceArea { get; set; }
-
///
/// 明细
///
@@ -86,9 +97,14 @@ public class AppointmentReceiveRequest : IValidatableObject
public IEnumerable Validate(ValidationContext validationContext)
{
- if (Start >= End)
+ if (DoorStart >= DoorEnd)
{
- yield return new ValidationResult("来访时间不能大于等于离开时间", new[] { nameof(Start), nameof(End) });
+ yield return new ValidationResult("门禁来访时间不能大于等于离开时间", new[] { nameof(DoorStart), nameof(DoorEnd) });
+ }
+
+ if (IsEnterWorkplace)
+ {
+
}
}
}
\ No newline at end of file
diff --git a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs
index 97a1e6be..072069e1 100644
--- a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs
+++ b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs
@@ -36,15 +36,18 @@ public class AppointmentService : IAppointmentService
No = request.No,
Title = request.Title,
Code = request.Code,
- Company = request.Company,
- ApplyTime = request.ApplyTime,
- ApplyArea = request.ApplyArea,
+ Source = request.Source,
+ Date = request.Date,
+ ApplyDoorArea = request.ApplyDoorArea,
Factory = request.Factory,
Reason = request.Reason,
- Start = request.Start,
- End = request.End,
+ DoorStart = request.DoorStart,
+ DoorEnd = request.DoorEnd,
Remark = request.Remark,
IsEnterWorkplace = request.IsEnterWorkplace,
+ ApplyWorkplaceArea = request.ApplyWorkplaceArea,
+ WorkplaceStart = request.WorkplaceStart,
+ WorkplaceEnd = request.WorkplaceEnd
});
foreach (var item in request.Items)
@@ -60,7 +63,7 @@ public class AppointmentService : IAppointmentService
Type = GainfoUserTypeEnumType.External,
IdNo = item.IdNo,
Name = item.Name,
- Source = request.Company,
+ Source = request.Source,
Phone = item.Phone
};
await _dbContext.InsertAsync(gainfo);
@@ -69,7 +72,7 @@ public class AppointmentService : IAppointmentService
{
if (gainfo.Type == GainfoUserTypeEnumType.External)
{
- gainfo.Source = request.Company;
+ gainfo.Source = request.Source;
gainfo.Phone = item.Phone;
await _dbContext.UpdateAsync(gainfo);
@@ -81,8 +84,9 @@ public class AppointmentService : IAppointmentService
var detail = new VisitorAppointmentDetailEntity
{
UserNo = gainfo.No,
- AppointmentId = id,
No = request.No,
+ IdType = item.IdType,
+ IdNo = item.IdNo,
Name = item.Name,
Phone = item.Phone,
Remark = item.Remark,
diff --git a/Src/Dlhis.External/EMealVoucher/Controllers/EMealVoucherController.cs b/Src/Dlhis.External/EMealVoucher/Controllers/EMealVoucherController.cs
index e065ddf7..401471cc 100644
--- a/Src/Dlhis.External/EMealVoucher/Controllers/EMealVoucherController.cs
+++ b/Src/Dlhis.External/EMealVoucher/Controllers/EMealVoucherController.cs
@@ -17,7 +17,7 @@ public class EMealVoucherController : ControllerBase
}
///
- /// 接收
+ /// 接收电子餐券
///
///
[HttpPost("receive")]
diff --git a/Src/Gateway/appsettings.json b/Src/Gateway/appsettings.json
index d0e733e1..45319d79 100644
--- a/Src/Gateway/appsettings.json
+++ b/Src/Gateway/appsettings.json
@@ -13,6 +13,7 @@
"Scheduled",
"Sys",
"Visitor",
- "Message"
+ "Message",
+ "External"
]
}
diff --git a/Src/Gateway/ocelot.json b/Src/Gateway/ocelot.json
index 1134886a..9d73c2e7 100644
--- a/Src/Gateway/ocelot.json
+++ b/Src/Gateway/ocelot.json
@@ -88,6 +88,17 @@
}
]
},
+ {
+ "UpstreamPathTemplate": "/api/external/{url}",
+ "DownstreamPathTemplate": "/api/{url}",
+ "DownstreamScheme": "http",
+ "DownstreamHostAndPorts": [
+ {
+ "Host": "192.168.199.30",
+ "Port": 30882
+ }
+ ]
+ },
{
"UpstreamPathTemplate": "/{url}/swagger/v1/swagger.json",
"DownstreamPathTemplate": "/{url}/swagger/v1/swagger.json",