20230324新增集团查看数据跳转页面、现场人员卡号补漏按钮功能

This commit is contained in:
2023-03-24 18:03:17 +08:00
parent 8b0c9fdef0
commit a9feacd3d2
123 changed files with 26137 additions and 50 deletions
@@ -29,7 +29,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in db.View_SitePerson_Person
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in Funs.DB.View_SitePerson_Person
select x;
/// <summary>
@@ -637,7 +637,7 @@ namespace BLL
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
{
string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId);
string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) + "-";
var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
{
@@ -660,7 +660,7 @@ namespace BLL
var getSitePerson = GetSitePersonById(sitepersinId);
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
{
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId));
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId) +"-");
getSitePerson.CardNo = cardNo;
Funs.DB.SubmitChanges();
}