20230627优化选择用户接口 角色不空 账号不空,优化生成卡号方法。

This commit is contained in:
2023-06-27 22:30:19 +08:00
parent ca2e5715b8
commit 225bc98fcd
9 changed files with 76 additions and 70 deletions
@@ -57,8 +57,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
try
{
SitePerson_PersonService.SendCardNo(this.StiePersonId);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
var getSitePerson = SitePerson_PersonService.GetSitePersonById(this.StiePersonId);
if (getSitePerson != null)
{
SitePerson_PersonService.SendCarNobySiteperson(getSitePerson);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("发卡未成功!", MessageBoxIcon.Warning);
return;
}
}
catch
{
@@ -319,21 +319,7 @@ namespace FineUIPro.Web.Person
if (projectId != Const._Null)
{
int count = 0;
var getSitePersons = from x in Funs.DB.SitePerson_Person
join y in Funs.DB.EduTrain_TrainRecordDetail on x.PersonId equals y.PersonId
join z in Funs.DB.EduTrain_TrainRecord on y.TrainingId equals z.TrainingId
where x.ProjectId == projectId && z.ProjectId == projectId && (x.CardNo == null || x.CardNo == "")
&& y.CheckResult == true
select x;
if (getSitePersons.Count() > 0)
{
foreach (var person in getSitePersons)
{
SitePerson_PersonService.SendCardNo(person.SitePersonId);
count++;
}
}
int count = GetDataService.SendCarNo(projectId);
Alert.ShowInParent("操作完成!共补卡号" + count.ToString() + "个。", MessageBoxIcon.Information);
BindGrid();
}