diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml
index fe266235..46cc13e6 100644
--- a/Tiobon.Core.Api/Tiobon.Core.Model.xml
+++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml
@@ -7705,6 +7705,11 @@
是否显示序号
+
+
+ 是否允许多次提交
+
+
状态
@@ -23692,6 +23697,11 @@
是否显示序号
+
+
+ 是否允许多次提交
+
+
状态
@@ -35138,15 +35148,15 @@
奖励积分
-
+
部门范围
-
+
-
+
员工范围
-
+
@@ -35173,6 +35183,11 @@
是否显示序号
+
+
+ 开始结束时间
+
+
备注
diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_Survey.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_Survey.Dto.Base.cs
index f9207894..7f371e16 100644
--- a/Tiobon.Core.Model/Base/Ghre/Ghre_Survey.Dto.Base.cs
+++ b/Tiobon.Core.Model/Base/Ghre/Ghre_Survey.Dto.Base.cs
@@ -6,7 +6,7 @@
*
* Ver 变更日期 负责人 变更内容
* ───────────────────────────────────
-*V0.01 2025/4/1 14:51:44 SimonHsiao 初版
+*V0.01 2025/4/1 16:25:48 SimonHsiao 初版
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*┌──────────────────────────────────┐
@@ -135,6 +135,11 @@ public class Ghre_SurveyBase
///
public bool? ShowSortNo { get; set; }
+ ///
+ /// 是否允许多次提交
+ ///
+ public bool? IsAllowMutiSubmit { get; set; }
+
///
/// 状态
///
diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_Survey.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_Survey.cs
index 992e481e..07a4ae7f 100644
--- a/Tiobon.Core.Model/Models/Ghre/Ghre_Survey.cs
+++ b/Tiobon.Core.Model/Models/Ghre/Ghre_Survey.cs
@@ -6,7 +6,7 @@
*
* Ver 变更日期 负责人 变更内容
* ───────────────────────────────────
-*V0.01 2025/4/1 15:49:36 SimonHsiao 初版
+*V0.01 2025/4/1 16:25:48 SimonHsiao 初版
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*┌──────────────────────────────────┐
@@ -136,6 +136,11 @@ public class Ghre_Survey : BasePoco
///
public bool? ShowSortNo { get; set; }
+ ///
+ /// 是否允许多次提交
+ ///
+ public bool? IsAllowMutiSubmit { get; set; }
+
///
/// 状态
///
diff --git a/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs b/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
index 061cdcd3..1b45d3c2 100644
--- a/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
+++ b/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
@@ -75,15 +75,13 @@ public class InsertGhre_SurveyExtend
///
/// 部门范围
- ///
- [Display(Name = "DeptId"), Description("部门范围"), MaxLength(2000, ErrorMessage = "部门范围 不能超过 2000 个字符")]
- public string DeptId { get; set; }
+ ///
+ public List DeptIds { get; set; }
///
/// 员工范围
- ///
- [Display(Name = "StaffId"), Description("员工范围"), MaxLength(2000, ErrorMessage = "员工范围 不能超过 2000 个字符")]
- public string StaffId { get; set; }
+ ///
+ public List StaffIds { get; set; }
///
/// 风格
@@ -114,6 +112,11 @@ public class InsertGhre_SurveyExtend
///
public bool? ShowSortNo { get; set; }
+ ///
+ /// 开始结束时间
+ ///
+ public List BeginEndTime { get; set; }
+
///
/// 备注
///
diff --git a/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs b/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs
index 47ca337e..ea228217 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs
@@ -46,6 +46,13 @@ public class Ghre_SurveyServices : BaseServices();
+ data.BeginEndTime.Add(data.BeginTime);
+ data.BeginEndTime.Add(data.EndTime);
+ if (entity.StaffId.IsNotEmptyOrNull())
+ data.StaffIds = JsonHelper.JsonToObj>(entity.StaffId);
+ if (entity.DeptId.IsNotEmptyOrNull())
+ data.DeptIds = JsonHelper.JsonToObj>(entity.DeptId);
+
var questions = await Db.Queryable().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
var options = await Db.Queryable().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
@@ -101,12 +108,26 @@ public class Ghre_SurveyServices : BaseServices> InsertData(long id, InsertGhre_SurveyExtend insertModel)
{
+
+ if (insertModel.BeginEndTime != null && insertModel.BeginEndTime.Count == 2)
+ {
+ insertModel.BeginTime = insertModel.BeginEndTime[0];
+ insertModel.EndTime = insertModel.BeginEndTime[1];
+ }
+
var data = ServiceResult.OprateSuccess("新增成功", id);
if (id == 0)
{
var insert = Mapper.Map(insertModel).ToANew();
insert.Status = "Temporary";
+
+ if (insertModel.StaffIds != null && insertModel.StaffIds.Any())
+ insert.StaffId = JsonHelper.ObjToJson(insertModel.StaffIds);
+
+ if (insertModel.DeptIds != null && insertModel.DeptIds.Any())
+ insert.DeptId = JsonHelper.ObjToJson(insertModel.DeptIds);
+
id = await Add(insert);
for (int i = 0; i < insertModel.Questions.Count; i++)
@@ -137,6 +158,12 @@ public class Ghre_SurveyServices : BaseServices();
+
+ if (insertModel.StaffIds != null && insertModel.StaffIds.Any())
+ insert.StaffId = JsonHelper.ObjToJson(insertModel.StaffIds);
+
+ if (insertModel.DeptIds != null && insertModel.DeptIds.Any())
+ insert.DeptId = JsonHelper.ObjToJson(insertModel.DeptIds);
await Update(id, insert, null, ["Status"]);
for (int i = 0; i < insertModel.Questions.Count; i++)
diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml
index fe266235..46cc13e6 100644
--- a/Tiobon.Core/Tiobon.Core.Model.xml
+++ b/Tiobon.Core/Tiobon.Core.Model.xml
@@ -7705,6 +7705,11 @@
是否显示序号
+
+
+ 是否允许多次提交
+
+
状态
@@ -23692,6 +23697,11 @@
是否显示序号
+
+
+ 是否允许多次提交
+
+
状态
@@ -35138,15 +35148,15 @@
奖励积分
-
+
部门范围
-
+
-
+
员工范围
-
+
@@ -35173,6 +35183,11 @@
是否显示序号
+
+
+ 开始结束时间
+
+
备注