2023-04-28
This commit is contained in:
@@ -95,7 +95,7 @@ namespace BLL
|
||||
Telephone = x.Telephone,
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
DepartName = x.DepartName,
|
||||
IsUsed = x.IsUsed == 1 ? true : false,
|
||||
IsUsed = x.IsUsed .HasValue?x.IsUsed.Value.ToString():"",
|
||||
IsUsedName = x.IsUsed == 0 ? "不启用" : "启用",
|
||||
AuditorId = x.AuditorId,
|
||||
AuditorName = db.Sys_User.First(z => z.UserId == x.AuditorId).UserName,
|
||||
@@ -202,7 +202,7 @@ namespace BLL
|
||||
Telephone = x.Telephone,
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
DepartName = x.DepartName,
|
||||
IsUsed = x.IsUsed==1?true:false,
|
||||
IsUsed = x.IsUsed.HasValue?x.IsUsed.Value.ToString():"",
|
||||
IsUsedName = x.IsUsed == 0 ? "不启用" : "启用",
|
||||
AuditorId = x.AuditorId,
|
||||
AuditorName = db.Sys_User.First(z => z.UserId == x.AuditorId).UserName,
|
||||
@@ -400,7 +400,7 @@ namespace BLL
|
||||
OutResult = x.OutResult,
|
||||
Telephone = x.Telephone,
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
IsUsed = x.IsUsed==1?true:false,
|
||||
IsUsed = x.IsUsed.HasValue?x.IsUsed.ToString():"",
|
||||
IsUsedName = (x.IsUsed == 1 ? "启用" : "未启用"),
|
||||
WorkAreaId = x.WorkAreaId,
|
||||
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||
@@ -567,13 +567,19 @@ namespace BLL
|
||||
/// <param name="workPostIds">培训岗位ID</param>
|
||||
/// <param name="trainTypeId">培训类型ID</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string departIds, string trainTypeId)
|
||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string departIds, string trainTypeId,string InTime,string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
DateTime inDateTime=DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(InTime))
|
||||
{
|
||||
inDateTime = DateTime.Parse(InTime);
|
||||
}
|
||||
|
||||
List<string> unitIdList = Funs.GetStrListByStr(unitIds, ',');
|
||||
var getPersons = from x in db.View_SitePerson_Person
|
||||
where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.IsUsed == 1
|
||||
where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.IsUsed == 1 &&(string.IsNullOrEmpty(strParam)||x.PersonName.Contains(strParam)) && (string.IsNullOrEmpty(InTime) || x.InTime < inDateTime)
|
||||
&& x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now)
|
||||
select new Model.PersonItem
|
||||
{
|
||||
@@ -723,13 +729,9 @@ namespace BLL
|
||||
{
|
||||
newPerson.ViceCNProfessionalId = person.ViceCNProfessionalId;
|
||||
}
|
||||
if (person.IsUsed == true)
|
||||
if (!string.IsNullOrEmpty(person.IsUsed))
|
||||
{
|
||||
newPerson.IsUsed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPerson.IsUsed = 0;
|
||||
newPerson.IsUsed = int.Parse(person.IsUsed);
|
||||
}
|
||||
newPerson.Password = PersonService.GetPersonPassWord(person.IdentityCard);
|
||||
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
|
||||
@@ -808,7 +810,10 @@ namespace BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
getPerson.IsUsed = person.IsUsed?1:0;
|
||||
if (!string.IsNullOrEmpty(person.IsUsed))
|
||||
{
|
||||
getPerson.IsUsed = int.Parse(person.IsUsed);
|
||||
}
|
||||
getPerson.AuditorDate = DateTime.Now;
|
||||
}
|
||||
getPerson.AuditorId = person.AuditorId;
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace BLL
|
||||
TestScores = x.TestScores ?? 0,
|
||||
TestType = x.TestType,
|
||||
TemporaryUser = x.TemporaryUser,
|
||||
Signature= x.Signature
|
||||
}).ToList();
|
||||
|
||||
foreach(var item in getDataLists)
|
||||
@@ -90,6 +91,7 @@ namespace BLL
|
||||
TestScores = x.TestScores ?? 0,
|
||||
TestType = x.TestType,
|
||||
TemporaryUser = x.TemporaryUser,
|
||||
Signature= x.Signature
|
||||
};
|
||||
var res = getDataLists.FirstOrDefault();
|
||||
if (res != null)
|
||||
@@ -845,5 +847,29 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改考试记录信息
|
||||
/// </summary>
|
||||
/// <param name="Training"></param>
|
||||
public static void updateTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_TestRecord newTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
|
||||
if (newTestRecord != null)
|
||||
{
|
||||
newTestRecord.TestScores = testRecord.TestScores;
|
||||
newTestRecord.TestEndTime = testRecord.TestEndTime;
|
||||
newTestRecord.IsFiled = testRecord.IsFiled;
|
||||
newTestRecord.Signature = testRecord.Signature;
|
||||
newTestRecord.Fingerprint = testRecord.Fingerprint;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user