This commit is contained in:
2026-04-15 16:35:06 +08:00
7 changed files with 162 additions and 5 deletions
+1 -1
View File
@@ -566,7 +566,7 @@ namespace BLL
{
var getPersons = from x in db.View_SitePerson_Person
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
where x.ProjectId == projectId
select new Model.PersonItem
{
SitePersonId = x.SitePersonId,
+4 -1
View File
@@ -5358,6 +5358,9 @@ namespace BLL
/// </summary>
public const string CQMS_MeetingMenuId = "30754DF1-CB18-4F53-BB66-2B2A398D7180";
/// <summary>
/// 质量会议
/// </summary>
public const string EntryEducationTrainTypeId = "8920c9cc-fa92-49b2-9493-775a55da27bb";
}
}
@@ -197,5 +197,24 @@ namespace BLL
}
return icount;
}
/// <summary>
/// 根据人员id、日期获取入场教育合格考试记录
/// </summary>
/// <param name="testRecordId"></param>
/// <returns></returns>
public static Model.Training_TestRecord GetOKTestRecordByPersonIdAndDate(string testManId, DateTime? date)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var testRecord = (from x in db.Training_TestRecord
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
join z in db.Training_Plan on y.PlanId equals z.PlanId
where x.TestManId == testManId && x.TestStartTime >= date && x.TestScores >= 60
&& z.TrainTypeId == BLL.Const.EntryEducationTrainTypeId
select x).FirstOrDefault();
return testRecord;
}
}
}
}
@@ -244,7 +244,7 @@ Where ProjectId=@ProjectId ";
}
if (this.ckTrain.Checked)
{
strSql += " AND (TrainCount =0 AND TrainCount1 =0)";
strSql += " AND ((TrainCount =0 AND TrainCount1 =0) || TrainCount2=0)";
}
if (this.ckIsUsed.Checked)
{
+18
View File
@@ -319096,6 +319096,8 @@ namespace Model
private System.Nullable<int> _TrainCount1;
private System.Nullable<int> _TrainCount2;
private string _AuditorId;
private string _AuditorName;
@@ -319728,6 +319730,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainCount2", DbType="Int")]
public System.Nullable<int> TrainCount2
{
get
{
return this._TrainCount2;
}
set
{
if ((this._TrainCount2 != value))
{
this._TrainCount2 = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditorId", DbType="NVarChar(50)")]
public string AuditorId
{
+15 -2
View File
@@ -436,7 +436,7 @@ namespace WebAPI.Controllers
/// <param name="name"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate,string isRepeat)
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate, string isRepeat)
{
var responeData = new Model.ResponeData();
try
@@ -546,7 +546,20 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData();
try
{
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
var getSitePerson = SitePerson_PersonService.GetSitePersonById(sitePersonId);
if (getSitePerson != null)
{
var testRecord = BLL.TestRecordService.GetOKTestRecordByPersonIdAndDate(getSitePerson.PersonId, getSitePerson.InTime);
if (testRecord != null)
{
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
}
else
{
responeData.code = 0;
responeData.message = "入场教育考试未合格,无法审核入场!";
}
}
}
catch (Exception ex)
{