2023-04-28

This commit is contained in:
2023-04-28 14:56:47 +08:00
parent f2ab2d5b73
commit 5b740e7bda
35 changed files with 1321 additions and 519 deletions
+17 -12
View File
@@ -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;