培训记录新增剔除无需学习数据

master
xiaochanghai 3 months ago
parent e6041b03fd
commit 743434c7d1
  1. 7165
      Model/Tiobon.Web.pdm
  2. 1
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  3. 4
      Tiobon.Core.Services/Ghre/Ghre_UshioPlanServices.cs

File diff suppressed because it is too large Load Diff

@ -49,6 +49,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
conditions += " AND IsEnable = 1";
else if (IsEnable == false)
conditions += " AND IsEnable = 0";
conditions += " AND (IsRequireStudy = 'true' OR IsRequireStudy IS NULL)";
if (!string.IsNullOrWhiteSpace(condition))
conditions += " AND " + condition;

@ -132,7 +132,7 @@ public class Ghre_UshioPlanServices : BaseServices<Ghre_UshioPlan, Ghre_UshioPla
{
if (entity.StaffId != null)
entity.StaffIds = JsonHelper.ObjToJson(entity.StaffId);
if (entity.TrainNum.IsNotEmptyOrNull())
if (entity.StaffId.IsNotEmptyOrNull() && entity.StaffId.Count > 0)
entity.TrainNum = entity.StaffId.Count;
if (entity.Months != null)
entity.Month = JsonHelper.ObjToJson(entity.Months);
@ -148,7 +148,7 @@ public class Ghre_UshioPlanServices : BaseServices<Ghre_UshioPlan, Ghre_UshioPla
if (editModel.Months != null)
editModel.Month = JsonHelper.ObjToJson(editModel.Months);
if (editModel.TrainNum.IsNotEmptyOrNull())
if (editModel.StaffId.IsNotEmptyOrNull() && editModel.StaffId.Count > 0)
editModel.TrainNum = editModel.StaffId.Count;
var result = await base.Update(Id, editModel, null, ["Status"]);
return result;

Loading…
Cancel
Save