20230627
This commit is contained in:
parent
225bc98fcd
commit
da7bf97960
|
|
@ -638,7 +638,7 @@ namespace BLL
|
|||
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
|
||||
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
|
||||
{
|
||||
cardNo= SendCarNobySiteperson(getSitePerson);
|
||||
cardNo= SendCarNobySiteperson(getSitePerson.SitePersonId);
|
||||
}
|
||||
|
||||
return cardNo;
|
||||
|
|
@ -649,11 +649,14 @@ namespace BLL
|
|||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public static string SendCarNobySiteperson(Model.SitePerson_Person item)
|
||||
public static string SendCarNobySiteperson(string sitePersonId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string carNo = string.Empty;
|
||||
var item = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId);
|
||||
if (item != null)
|
||||
{
|
||||
var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId && x.CheckResult == true);
|
||||
if (isNull != null) ////参加过培训的人员
|
||||
{
|
||||
|
|
@ -667,7 +670,7 @@ namespace BLL
|
|||
var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length - 5));
|
||||
if (getInt.HasValue)
|
||||
{
|
||||
carNo= item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, prefix);
|
||||
carNo = item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, prefix);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
|
@ -678,7 +681,7 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return carNo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ namespace BLL
|
|||
select x;
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(SitePerson_PersonService.SendCarNobySiteperson(item)))
|
||||
if (!string.IsNullOrEmpty(SitePerson_PersonService.SendCarNobySiteperson(item.SitePersonId)))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,18 +57,9 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
{
|
||||
try
|
||||
{
|
||||
var getSitePerson = SitePerson_PersonService.GetSitePersonById(this.StiePersonId);
|
||||
if (getSitePerson != null)
|
||||
{
|
||||
SitePerson_PersonService.SendCarNobySiteperson(getSitePerson);
|
||||
SitePerson_PersonService.SendCarNobySiteperson(this.StiePersonId);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("发卡未成功!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
ShowNotify("发卡未成功!", MessageBoxIcon.Warning);
|
||||
|
|
|
|||
Loading…
Reference in New Issue