提交代码

This commit is contained in:
2024-05-16 09:15:08 +08:00
parent 9a2ba1af64
commit 9191546586
27 changed files with 3505 additions and 12 deletions
+17 -9
View File
@@ -61,7 +61,7 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.PersonItem person = new Model.PersonItem();
var getProjectPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId || (x.ProjectId == projectId && x.ProjectId.Length > 1 && x.IdentityCard == idcard));
var getProjectPerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId || (x.ProjectId == projectId && x.ProjectId.Length > 1 && x.IdentityCard == idcard));
if (getProjectPerson != null)
{
person.SitePersonId = getProjectPerson.SitePersonId;
@@ -133,7 +133,8 @@ namespace BLL
person.AttachUrl2 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#2", null);
person.AttachUrl3 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#3", null);
person.AttachUrl4 = getAttachUrl4(getProjectPerson.PersonId);
person.AttachUrl5 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#5", null);
person.AttachUrl5 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#5", null);
person.AttachUrl6 = APIUpLoadFileService.getFileUrl(getProjectPerson.PersonId + "#6", null);
}
var getPerson = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == idcard && idcard.Length > 1);
if (getPerson != null)
@@ -443,11 +444,11 @@ 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 trainTypeId,string name)
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getPersons = from x in db.View_SitePerson_Person
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
select new Model.PersonItem
@@ -583,7 +584,7 @@ namespace BLL
UserId = newPerson.PersonId,
MenuId = Const.PersonListMenuId,
OperationName = "APP修改人员",
OperationLog = "修改人员"+newPerson.PersonName,
OperationLog = "修改人员" + newPerson.PersonName,
DataId = newPerson.PersonId,
ProjectId = person.ProjectId,
};
@@ -598,7 +599,7 @@ namespace BLL
if (!string.IsNullOrEmpty(newPerson.PersonId))
{
SaveMeetUrl(newPerson.PersonId, Const.PersonListMenuId, person.AttachUrl1, person.AttachUrl2, person.AttachUrl3, person.AttachUrl4, person.AttachUrl5);
SaveMeetUrl(newPerson.PersonId, Const.PersonListMenuId, person.AttachUrl1, person.AttachUrl2, person.AttachUrl3, person.AttachUrl4, person.AttachUrl5, person.AttachUrl6);
}
if (person.States == Const.ProjectPersonStates_0 && !string.IsNullOrEmpty(newProjectPerson.AuditorId))
@@ -619,7 +620,7 @@ namespace BLL
/// <summary>
/// 人员附件保存方法
/// </summary>
public static void SaveMeetUrl(string personId, string menuId, string url1, string url2, string url3, string url4, string url5)
public static void SaveMeetUrl(string personId, string menuId, string url1, string url2, string url3, string url4, string url5, string url6)
{
Model.ToDoItem toDoItem = new Model.ToDoItem
{
@@ -659,6 +660,13 @@ namespace BLL
{
APIUpLoadFileService.SaveAttachUrl(toDoItem);
}
toDoItem.DataId = personId + "#6";
toDoItem.UrlStr = url6;
if (!string.IsNullOrEmpty(url6))
{
APIUpLoadFileService.SaveAttachUrl(toDoItem);
}
}
#endregion
@@ -755,7 +763,7 @@ namespace BLL
var getPerson = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == person.IdentityCard || x.PersonId == person.PersonId);
if (getPerson == null)
{
var getSitePerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId ==person.PersonId);
var getSitePerson = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == person.PersonId);
if (getSitePerson != null)
{
getPerson = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == getSitePerson.IdentityCard || x.PersonId == getSitePerson.PersonId);
@@ -778,7 +786,7 @@ namespace BLL
getPerson.IDCardUrl = person.AttachUrl1;
}
db.SubmitChanges();
SaveMeetUrl(getPerson.PersonId, Const.PersonListMenuId, person.AttachUrl1, person.AttachUrl2, person.AttachUrl3, person.AttachUrl4, person.AttachUrl5);
SaveMeetUrl(getPerson.PersonId, Const.PersonListMenuId, person.AttachUrl1, person.AttachUrl2, person.AttachUrl3, person.AttachUrl4, person.AttachUrl5, person.AttachUrl6);
}
}
}